mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
提高rtsp播放器兼容性: #2159
This commit is contained in:
parent
9d40c82141
commit
56ccd4332a
@ -166,9 +166,10 @@ void SdpParser::load(const string &sdp) {
|
||||
break;
|
||||
case 'm': {
|
||||
track = std::make_shared<SdpTrack>();
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user