summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2005-08-17 10:30:55 +0000
committerWim Taymans <wim.taymans@gmail.com>2005-08-17 10:30:55 +0000
commitbf2d582666608af60dc1ee65b226da48e6248511 (patch)
tree6d3632587ef9e6ccc393d8206eb1c2c2446edbf9
parent51a630d417c919faa50180883acc9cf9b907f662 (diff)
gst/rtsp/gstrtspsrc.c: Support absolute control urls too.
Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_open), (gst_rtspsrc_play): Support absolute control urls too.
-rw-r--r--ChangeLog5
-rw-r--r--gst/rtsp/gstrtspsrc.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6c4b0213..481020e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-17 Wim Taymans <wim@fluendo.com>
+
+ * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_open), (gst_rtspsrc_play):
+ Support absolute control urls too.
+
2005-08-16 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/avi/gstavidemux.c: (gst_avi_demux_parse_stream),
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index fea449fe..94977517 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -604,8 +604,13 @@ gst_rtspsrc_open (GstRTSPSrc * src)
continue;
}
- /* FIXME, check absolute/relative URL */
- setup_url = g_strdup_printf ("%s/%s", src->location, control_url);
+ /* check absolute/relative URL */
+ /* FIXME, what if the control_url starts with a '/' or a non rtsp: protocol? */
+ if (g_str_has_prefix (control_url, "rtsp://")) {
+ setup_url = g_strdup (control_url);
+ } else {
+ setup_url = g_strdup_printf ("%s/%s", src->location, control_url);
+ }
GST_DEBUG ("setup %s", setup_url);
/* create SETUP request */