Bug 90019 - agent: stream names with spaces generate invalid SDP
Summary: agent: stream names with spaces generate invalid SDP
Status: RESOLVED FIXED
Alias: None
Product: nice
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Olivier Crête
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-13 17:52 UTC by Ilya Konstantinov
Modified: 2015-04-20 20:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Ilya Konstantinov 2015-04-13 17:52:39 UTC
nice_agent_generate_local_sdp generates invalid SDP for stream names with spaces in them.
Comment 1 Olivier Crête 2015-04-13 21:52:14 UTC
We should forbid stream names that are not valid for SDP as this is the only thing they are used for.
Comment 2 Olivier Crête 2015-04-20 20:11:30 UTC
In fact, it seems that in SDP, the only valid values are: audio, video, text, application, image and message. Ref: http://www.iana.org/assignments/sdp-parameters/sdp-parameters.xhtml#sdp-parameters-1

So this stream-name API is crap, we should deprecate it and replace it with an enum. The way it is used is also very wrong, as it is used to match streams. The only correct way to match streams to the SDP is by counting the number of m= lines. See RFC 3264.

Fixed it

commit 5972db04c554f73187185b333d1d71c81be96f72
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Mon Apr 20 16:09:28 2015 -0400

    agent: Count m= files to match streams
    
    The only valid way to match streams is to count m= lines, see RFC 3264.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=90019

commit 483bdcf8c64b8d77e267706df59bfaae4d701380
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Mon Apr 20 16:08:42 2015 -0400

    agent: Warn on invalid media types for SDP
    
    Only 6 strings are valid.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=90019


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.