兼容某些rtsp流sdp中aac config不规范的bug (#4642)
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled

This commit is contained in:
xia-chu 2026-01-24 23:57:36 +08:00
parent 6e485ad31a
commit da9deb352c

View File

@ -396,6 +396,12 @@ Track::Ptr getTrackBySdp(const SdpTrack::Ptr &track) {
// If aac config information cannot be obtained from sdp, then it cannot be obtained from rtp either, so ignore this Track
return nullptr;
}
while (aac_cfg_str.size() < 4) {
aac_cfg_str = '0' + aac_cfg_str;
}
if (aac_cfg_str.size() > 4) {
aac_cfg_str = aac_cfg_str.substr(0, 4);
}
string aac_cfg;
for (size_t i = 0; i < aac_cfg_str.size() / 2; ++i) {
unsigned int cfg;