From bf2d582666608af60dc1ee65b226da48e6248511 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 17 Aug 2005 10:30:55 +0000 Subject: 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. --- gst/rtsp/gstrtspsrc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gst/rtsp') 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 */ -- cgit