1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for #133, alloc and free rtp port.

This commit is contained in:
winlin 2015-02-17 21:10:06 +08:00
parent d4ceff649f
commit f14af45413
9 changed files with 183 additions and 38 deletions

View file

@ -746,6 +746,18 @@ int SrsRtspStack::do_recv_message(SrsRtspRequest* req)
}
}
// for setup, parse the stream id from uri.
if (req->is_setup()) {
size_t pos = string::npos;
if ((pos = req->uri.rfind("/")) != string::npos) {
req->stream_id = req->uri.substr(pos + 1);
}
if ((pos = req->stream_id.find("=")) != string::npos) {
req->stream_id = req->stream_id.substr(pos + 1);
}
srs_info("rtsp: setup stream id=%s", req->stream_id.c_str());
}
// parse rdp body.
long consumed = 0;
while (consumed < req->content_length) {