From 8b20603f8bf38012256865df6d22825a27bd5f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 21 Sep 2012 21:54:36 +0100 Subject: [PATCH] rtspsrc: answer URI query Without this, something also answered the query with TRUE but without setting a uri, not sure what that was.. --- gst/rtsp/gstrtspsrc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 3a1d538925..b3af06f3aa 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -265,6 +265,7 @@ static GstRTSPResult gst_rtspsrc_close (GstRTSPSrc * src, gboolean async, static gboolean gst_rtspsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri, GError ** error); +static gchar *gst_rtspsrc_uri_get_uri (GstURIHandler * handler); static gboolean gst_rtspsrc_activate_streams (GstRTSPSrc * src); static gboolean gst_rtspsrc_loop (GstRTSPSrc * src); @@ -2100,6 +2101,18 @@ gst_rtspsrc_handle_src_query (GstPad * pad, GstObject * parent, } break; } + case GST_QUERY_URI: + { + gchar *uri; + + uri = gst_rtspsrc_uri_get_uri (GST_URI_HANDLER (src)); + if (uri != NULL) { + gst_query_set_uri (query, uri); + g_free (uri); + res = TRUE; + } + break; + } default: { GstPad *target = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (pad));