hlsdemux2: Fix initial playlist setup.
authorEdward Hervey <edward@centricular.com>
Fri, 8 Jul 2022 08:48:05 +0000 (10:48 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 4 Aug 2022 13:49:27 +0000 (14:49 +0100)
There is now only a single case where we setup the initial playlist to 0, which
is for the very first variant stream.

Rendition streams will have the initial playlist "synchronized" against the
variant stream media playlist.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2839>

subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c

index a23a386..9805470 100644 (file)
@@ -2149,9 +2149,11 @@ gst_hls_demux_stream_update_media_playlist (GstHLSDemux * demux,
     gst_hls_media_playlist_unref (stream->playlist);
     stream->playlist = new_playlist;
   } else {
-    GST_DEBUG_OBJECT (stream, "Setting up initial playlist");
+    if (stream->is_variant) {
+      GST_DEBUG_OBJECT (stream, "Setting up initial playlist");
+      setup_initial_playlist (demux, new_playlist);
+    }
     stream->playlist = new_playlist;
-    setup_initial_playlist (demux, new_playlist);
   }
 
   if (stream->is_variant) {