修复rtsp aac config兼容性bug: #1011

This commit is contained in:
ziyue 2021-07-30 16:52:13 +08:00
parent 375d36b4c8
commit 6df0ee69e0

View File

@ -27,9 +27,9 @@ namespace mediakit{
Track::Ptr Factory::getTrackBySdp(const SdpTrack::Ptr &track) {
if (strcasecmp(track->_codec.data(), "mpeg4-generic") == 0) {
string aac_cfg_str = FindField(track->_fmtp.data(), "config=", nullptr);
string aac_cfg_str = FindField(track->_fmtp.data(), "config=", ";");
if (aac_cfg_str.empty()) {
aac_cfg_str = FindField(track->_fmtp.data(), "config=", ";");
aac_cfg_str = FindField(track->_fmtp.data(), "config=", nullptr);
}
if (aac_cfg_str.empty()) {
//如果sdp中获取不到aac config信息那么在rtp也无法获取那么忽略该Track