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
This commit is contained in:
Wim Taymans 2011-04-05 17:12:28 +02:00
parent cea556b75c
commit 547c97f590

View file

@ -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)