mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 12:11:36 +08:00
修复rtsp sdp解析的bug
This commit is contained in:
parent
2242577661
commit
d2f02c0a0c
@ -235,7 +235,7 @@ void SdpParser::load(const string &sdp) {
|
||||
}
|
||||
}
|
||||
|
||||
for (it = track._attr.find("rtpmap"); it != track._attr.end();) {
|
||||
for (it = track._attr.find("rtpmap"); it != track._attr.end() && it->first == "rtpmap";) {
|
||||
auto &rtpmap = it->second;
|
||||
int pt, samplerate, channel;
|
||||
char codec[16] = {0};
|
||||
@ -262,7 +262,7 @@ void SdpParser::load(const string &sdp) {
|
||||
++it;
|
||||
}
|
||||
|
||||
for (it = track._attr.find("fmtp"); it != track._attr.end(); ) {
|
||||
for (it = track._attr.find("fmtp"); it != track._attr.end() && it->first == "fmtp"; ) {
|
||||
auto &fmtp = it->second;
|
||||
int pt;
|
||||
sscanf(fmtp.data(), "%d", &pt);
|
||||
|
Loading…
Reference in New Issue
Block a user