diff --git a/src/Rtsp/Rtsp.cpp b/src/Rtsp/Rtsp.cpp index a2db7796..251b7f65 100644 --- a/src/Rtsp/Rtsp.cpp +++ b/src/Rtsp/Rtsp.cpp @@ -166,9 +166,10 @@ void SdpParser::load(const string &sdp) { break; case 'm': { track = std::make_shared(); - int pt, port; + int pt, port, port_count; char rtp[16] = {0}, type[16]; - if (4 == sscanf(opt_val.data(), " %15[^ ] %d %15[^ ] %d", type, &port, rtp, &pt)) { + if (4 == sscanf(opt_val.data(), " %15[^ ] %d %15[^ ] %d", type, &port, rtp, &pt) || + 5 == sscanf(opt_val.data(), " %15[^ ] %d/%d %15[^ ] %d", type, &port, &port_count, rtp, &pt)) { track->_pt = pt; track->_samplerate = RtpPayload::getClockRate(pt); track->_channel = RtpPayload::getAudioChannel(pt);