summaryrefslogtreecommitdiffstats
path: root/gst/rtsp
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2006-02-15 10:15:47 +0000
committerWim Taymans <wim.taymans@gmail.com>2006-02-15 10:15:47 +0000
commitccfc0d947c016a5be360721e0654a8710981ce2c (patch)
treec71fb9d30481df6b28e5785faab6621214612553 /gst/rtsp
parent484c2cc160d0b97ee9ba6f83e22ba937d890e05b (diff)
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
Diffstat (limited to 'gst/rtsp')
-rw-r--r--gst/rtsp/rtsptransport.c14
1 files changed, 9 insertions, 5 deletions
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;
}