[vlc-devel] Re: [PATCH] Issues with SDP parsing
Alexander Gall
gall at switch.ch
Mon Mar 6 18:54:41 CET 2006
On Mon, 6 Mar 2006 18:23:56 +0100, Derk-Jan Hartman <hartman at videolan.org> said:
> On 6-mrt-2006, at 18:18, Christophe Mutricy wrote:
>> On Mon, Mar 06, 06 at 17:05 +0100, Alexander Gall wrote:
>>> I believe that the "m=" field is mandatory in SDP. Currently,
>> [...]
>>> msg_Warn( p_obj, "invalid transport port %i",
>>> i_port );
>>> + FREE( psz_uri );
>>> + return VLC_EGENERIC;
>> [...]
>>> }
>>> + } else {
>>> + msg_Warn( p_obj, "missing m field" );
>>> + FREE( psz_uri );
>>> + return VLC_EGENERIC;
>>
>> If we return a VLC_EGENERIC i think we could go for a msg_Err().
> no. Because SAP preparses SDPs, so each and every SDP on the network
> would cause an Error box to pop up when you are listening to SDP.
>> For the m= field i know nothing to sdp myself. but maybe the VLC
>> implemetation don't relly on it, or just not co;plain when it's absent
>> to support brocken annonces.
> If there is no m= line then there is no single ES in the SDP. It's
> valid i guess, but shouldn't Crash VLC, nor would such a description
> be useful. However i doubt the SDP RFC excludes the possibility.
I think it does. RFC 2327, section 6 lists m= as mandatory:
[...]
Some lines in each description are required and some
are optional but all must appear in exactly the order given here (the
fixed order greatly enhances error detection and allows for a simple
parser). Optional items are marked with a `*'.
Session description
v= (protocol version)
o= (owner/creator and session identifier).
s= (session name)
i=* (session information)
[...]
Media description
m= (media name and transport address)
i=* (media title)
[...]
In any case, as you say, the important thing is that VLC does
something sensible.
--
Alex
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list