diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-playlist-loader.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-playlist-loader.c index 76efef5907..91a9f9eef3 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-playlist-loader.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-playlist-loader.c @@ -358,6 +358,10 @@ static gchar * apply_directives_to_uri (GstHLSDemuxPlaylistLoader * pl, const gchar * playlist_uri, struct PlaylistDownloadParams *dl_params) { + /* Short-circuit URI parsing if nothing will change */ + if (dl_params->flags == 0) + return g_strdup (playlist_uri); + GstUri *uri = gst_uri_from_string (playlist_uri); if (dl_params->flags & PLAYLIST_DOWNLOAD_FLAG_SKIP_V1) {