[reSIProcate] [PATCH] SDP: Parse broken rtpmap
Hi,
The SDP content of a 3rd party client sends a broken rtpmap attribute:
a=rtpmap:126 H264
As you can see the rate parameter is missing. The attaches patch skips
parsing the rate if eof is already reached.
Are you willing to apply this patch or should the nonstandard behavior
be controlled by a configuration variable?
Thanks,
Gregor
Index: resip/stack/SdpContents.cxx
===================================================================
--- resip/stack/SdpContents.cxx (revision 8543)
+++ resip/stack/SdpContents.cxx (working copy)
@@ -1766,9 +1766,12 @@
const char* anchor = pb.skipWhitespace();
pb.skipToChar(Symbols::SLASH[0]);
pb.data(mName, anchor);
- pb.skipChar(Symbols::SLASH[0]);
- mRate = pb.integer();
- pb.skipToChar(Symbols::SLASH[0]);
+ if(!pb.eof())
+ {
+ pb.skipChar(Symbols::SLASH[0]);
+ mRate = pb.integer();
+ pb.skipToChar(Symbols::SLASH[0]);
+ }
if(!pb.eof() && *pb.position() == Symbols::SLASH[0])
{
anchor = pb.skipChar(Symbols::SLASH[0]);