mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
dashdemux: mpd parsing: fix query parameter parsing
Try harder to detect URL parameters and split them to accomodate the fragment url in the concat: base-url + fragment-url + url-parameters
This commit is contained in:
parent
4ca530f2fe
commit
a53fd87508
1 changed files with 9 additions and 4 deletions
|
@ -2431,7 +2431,6 @@ static gchar *
|
|||
gst_mpdparser_parse_baseURL (GstMpdClient * client, GstActiveStream * stream,
|
||||
gchar ** query)
|
||||
{
|
||||
//GstActiveStream *stream;
|
||||
GstStreamPeriod *stream_period;
|
||||
GstBaseURL *baseURL;
|
||||
GList *list;
|
||||
|
@ -2439,9 +2438,6 @@ gst_mpdparser_parse_baseURL (GstMpdClient * client, GstActiveStream * stream,
|
|||
static gchar empty[] = "";
|
||||
gchar *ret = NULL;
|
||||
|
||||
//stream =
|
||||
// gst_mpdparser_get_active_stream_by_index (client, client->stream_idx);
|
||||
|
||||
g_return_val_if_fail (stream != NULL, empty);
|
||||
stream_period = gst_mpdparser_get_stream_period (client);
|
||||
g_return_val_if_fail (stream_period != NULL, empty);
|
||||
|
@ -2486,6 +2482,7 @@ gst_mpdparser_parse_baseURL (GstMpdClient * client, GstActiveStream * stream,
|
|||
}
|
||||
|
||||
ret = g_strjoinv (NULL, baseURL_array);
|
||||
|
||||
/* get base URI from MPD file URI, if the "http" scheme is missing */
|
||||
if (client->mpd_uri != NULL && strncmp (ret, "http://", 7) != 0) {
|
||||
gchar *last_sep, *tmp1, *tmp2;
|
||||
|
@ -2515,6 +2512,14 @@ gst_mpdparser_parse_baseURL (GstMpdClient * client, GstActiveStream * stream,
|
|||
}
|
||||
}
|
||||
|
||||
if (ret && *query == NULL) {
|
||||
gchar *params = strchr (ret, '?');
|
||||
if (params) {
|
||||
*query = g_strdup (params);
|
||||
params[0] = '\0'; /* can ignore the rest of the string */
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue