[vlc-devel] commit: SAP: m= subtype is not supposed to be a number in with the "udp" ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Mar 19 18:31:45 CET 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed Mar 19 19:31:15 2008 +0200| [50f3a306ea5c05c6505594e785c508cdf1c5d9cb]
SAP: m= subtype is not supposed to be a number in with the "udp"
protocol, so don't try to use atoi() there.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=50f3a306ea5c05c6505594e785c508cdf1c5d9cb
---
modules/services_discovery/sap.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index ebda11f..d591248 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -969,15 +969,19 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
if (subtype == NULL)
{
msg_Dbg (p_obj, "missing SDP media subtype: %s", sdp_proto);
- p_sdp->i_media_type = 0;
+ free (sdp_proto);
+ return VLC_EGENERIC;
}
else
{
*subtype++ = '\0';
- p_sdp->i_media_type = atoi (subtype);
+ /* FIXME: check for multiple payload types in RTP/AVP case.
+ * FIXME: check for "mpeg" subtype in raw udp case. */
+ if (!strcasecmp (sdp_proto, "udp"))
+ p_sdp->i_media_type = 33;
+ else
+ p_sdp->i_media_type = atoi (subtype);
}
- if (p_sdp->i_media_type == 0)
- p_sdp->i_media_type = 33;
/* RTP protocol, nul, VLC shortcut, nul, flags byte as follow:
* 0x1: Connection-Oriented media. */
More information about the vlc-devel
mailing list