Menu

#2 Error parsing media format

open
nobody
None
5
2009-08-27
2009-08-27
No

According to the ABNF specified in RFC 4566, the media format is not "alpha-numeric" only, it is "token" instead.
In fact, the "token" rule allows several more characters than those allowed by the regular expressions used by jSDP to validate the various SDP tokens, that's "\w".

For the sake of clarity, the following media descriptor is not parsed correctly by jSDP version 1.1 (Mon May 05 2008 18:45)

m=message 0 TCP/RTMP *

Please, note the trailing star "*".

The SDPFactory.parseSessionDescription() methods throw the following exception:

Exception in thread "main" net.sourceforge.jsdp.SDPParseException: Invalid session description
at net.sourceforge.jsdp.SDPFactory.parseSessionDescription(SDPFactory.java:1030)
at net.sourceforge.jsdp.SDPFactory.parseSessionDescription(SDPFactory.java:598)
at Test.main(Test.java:8)
Caused by: net.sourceforge.jsdp.SDPParseException: Cannot parse a media description
at net.sourceforge.jsdp.SDPFactory.parseSessionDescription(SDPFactory.java:1017)
... 2 more
Caused by: net.sourceforge.jsdp.SDPParseException: The string "m=message 0 TCP/RTMP *" isn't a valid origin field
at net.sourceforge.jsdp.Media.parse(Media.java:158)
at net.sourceforge.jsdp.SDPFactory.parseSessionDescription(SDPFactory.java:891)
... 2 more
Caused by: net.sourceforge.jsdp.SDPException: Invalid media format: *
at net.sourceforge.jsdp.Media.addMediaFormat(Media.java:174)
at net.sourceforge.jsdp.Media.<init>(Media.java:86)
at net.sourceforge.jsdp.Media.<init>(Media.java:104)
at net.sourceforge.jsdp.Media.parse(Media.java:138)
... 3 more

Discussion


Log in to post a comment.

MongoDB Logo MongoDB