From 1df82cddeb1e67b842d84266637b6cd0cf4dadef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 16 Sep 2015 23:38:24 +0200 Subject: [PATCH] dashdemux: Properly handle relative and non-HTTP URIs for the headers/indices gst_uri_join_strings() will return the second parameter if it is an absolute URI. No need to do a (wrong) check if the URI is absolute or not beforehand. https://bugzilla.gnome.org/show_bug.cgi?id=755134 --- ext/dash/gstdashdemux.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index f1b3091..ae349d1 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -911,27 +911,23 @@ gst_dash_demux_stream_update_headers_info (GstAdaptiveDemuxStream * stream) &path, dashstream->index, &stream->fragment.header_range_start, &stream->fragment.header_range_end); - if (path != NULL && strncmp (path, "http://", 7) != 0) { + if (path != NULL) { stream->fragment.header_uri = gst_uri_join_strings (gst_mpdparser_get_baseURL (dashdemux->client, dashstream->index), path); g_free (path); - } else { - stream->fragment.header_uri = path; + path = NULL; } - path = NULL; gst_mpd_client_get_next_header_index (dashdemux->client, &path, dashstream->index, &stream->fragment.index_range_start, &stream->fragment.index_range_end); - if (path != NULL && strncmp (path, "http://", 7) != 0) { + if (path != NULL) { stream->fragment.index_uri = gst_uri_join_strings (gst_mpdparser_get_baseURL (dashdemux->client, dashstream->index), path); g_free (path); - } else { - stream->fragment.index_uri = path; } } -- 2.7.4