mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
hlsdemux2: Place HLS delivery directives in UTF-8 order.
Use new GstURI gst_uri_to_string_with_keys() API to produce the playlist URI with query arguments in UTF-8 order. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
This commit is contained in:
parent
21cb739830
commit
1cede1d0cf
1 changed files with 9 additions and 1 deletions
|
@ -1262,7 +1262,15 @@ apply_directives_to_uri (GstHLSDemuxStream * stream,
|
|||
}
|
||||
}
|
||||
|
||||
gchar *out_uri = gst_uri_to_string (uri);
|
||||
/* Produce the resulting URI with query arguments in UTF-8 order
|
||||
* as required by the HLS spec:
|
||||
* `Clients using Delivery Directives (Section 6.2.5) MUST ensure that
|
||||
* all query parameters appear in UTF-8 order within the URI.`
|
||||
*/
|
||||
GList *keys = gst_uri_get_query_keys (uri);
|
||||
if (keys)
|
||||
keys = g_list_sort (keys, (GCompareFunc) g_strcmp0);
|
||||
gchar *out_uri = gst_uri_to_string_with_keys (uri, keys);
|
||||
gst_uri_unref (uri);
|
||||
|
||||
return out_uri;
|
||||
|
|
Loading…
Reference in a new issue