From ccfc0d947c016a5be360721e0654a8710981ce2c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 15 Feb 2006 10:15:47 +0000 Subject: gst/avi/gstavidemux.c: Add comment in a fultile attempt to stop the copy-and-paste paradigm leading to duplication of... Original commit message from CVS: * gst/avi/gstavidemux.c: (gst_avi_demux_handle_src_event): Add comment in a fultile attempt to stop the copy-and-paste paradigm leading to duplication of bad code. * gst/rtsp/rtsptransport.c: (rtsp_transport_parse): Mime parameters have to be checked case insensitive --- gst/rtsp/rtsptransport.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'gst/rtsp') diff --git a/gst/rtsp/rtsptransport.c b/gst/rtsp/rtsptransport.c index 3c208ee2..3fdea275 100644 --- a/gst/rtsp/rtsptransport.c +++ b/gst/rtsp/rtsptransport.c @@ -80,7 +80,7 @@ parse_range (RTSPTransport * transport, gchar * str, RTSPRange * range) RTSPResult rtsp_transport_parse (gchar * str, RTSPTransport * transport) { - gchar **split; + gchar **split, *down; gint i; if (str == NULL || transport == NULL) @@ -88,14 +88,17 @@ rtsp_transport_parse (gchar * str, RTSPTransport * transport) rtsp_transport_init (transport); - split = g_strsplit (str, ";", 0); + /* case insensitive */ + down = g_ascii_strdown (str, -1); + + split = g_strsplit (down, ";", 0); i = 0; while (split[i]) { - if (g_str_has_prefix (split[i], "RTP/AVP/UDP")) { + if (g_str_has_prefix (split[i], "rtp/avp/udp")) { transport->lower_transport = RTSP_LOWER_TRANS_UDP; - } else if (g_str_has_prefix (split[i], "RTP/AVP/TCP")) { + } else if (g_str_has_prefix (split[i], "rtp/avp/tcp")) { transport->lower_transport = RTSP_LOWER_TRANS_TCP; - } else if (g_str_has_prefix (split[i], "RTP/AVP")) { + } else if (g_str_has_prefix (split[i], "rtp/avp")) { transport->lower_transport = RTSP_LOWER_TRANS_UDP; } else if (g_str_has_prefix (split[i], "multicast")) { transport->multicast = TRUE; @@ -130,6 +133,7 @@ rtsp_transport_parse (gchar * str, RTSPTransport * transport) i++; } g_strfreev (split); + g_free (down); return RTSP_OK; } -- cgit