兼容sdp不规范的rtsp流

This commit is contained in:
xia-chu 2021-02-28 21:02:23 +08:00
parent 6548f7959f
commit 9b7c9b9109

View File

@ -244,6 +244,10 @@ void SdpParser::load(const string &sdp) {
track._codec = codec; track._codec = codec;
track._samplerate = samplerate; track._samplerate = samplerate;
} }
if (!track._samplerate && track._type == TrackVideo) {
//未设置视频采样率时赋值为90000
track._samplerate = 90000;
}
} }
it = track._attr.find("fmtp"); it = track._attr.find("fmtp");