From 547c97f59036030d8476f68b4725398c7545f8d3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 5 Apr 2011 17:12:28 +0200 Subject: [PATCH] rtspsrc: handle * control correctly Parse session control attributes when no media control attribute is present. Threat * control attributes as an empty string, just like the spec says. Fixes #646800 --- gst/rtsp/gstrtspsrc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index fbd57e0..8990d6f 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -1026,6 +1026,8 @@ gst_rtspsrc_create_stream (GstRTSPSrc * src, GstSDPMessage * sdp, gint idx) * configure the transport of the stream and is used to identity the stream in * the RTP-Info header field returned from PLAY. */ control_url = gst_sdp_media_get_attribute_val (media, "control"); + if (control_url == NULL) + control_url = gst_sdp_message_get_attribute_val_n (sdp, "control", 0); GST_DEBUG_OBJECT (src, "stream %d, (%p)", stream->id, stream); GST_DEBUG_OBJECT (src, " pt: %d", stream->pt); @@ -1047,6 +1049,9 @@ gst_rtspsrc_create_stream (GstRTSPSrc * src, GstSDPMessage * sdp, gint idx) const gchar *base; gboolean has_slash; + if (g_strcmp0 (control_url, "*") == 0) + control_url = ""; + if (src->control) base = src->control; else if (src->content_base) -- 2.7.4