hlsdemux2: Make sure simple media playlist is properly primed

By setting/propagating stream time initially

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
This commit is contained in:
Edward Hervey 2023-01-04 10:28:40 +01:00 committed by GStreamer Marge Bot
parent 3d0e8aa07e
commit eb1eb64506

View file

@ -747,8 +747,17 @@ gst_hls_demux_process_initial_manifest (GstAdaptiveDemux * demux,
if (simple_media_playlist) {
GstM3U8SeekResult seek_result;
GstM3U8MediaSegment *segment;
hlsdemux->main_stream->playlist = simple_media_playlist;
/* This is the initial variant playlist. We will use it to base all our timing
* from. */
segment = g_ptr_array_index (simple_media_playlist->segments, 0);
if (segment) {
segment->stream_time = 0;
gst_hls_media_playlist_recalculate_stream_time (simple_media_playlist,
segment);
}
if (!gst_hls_media_playlist_get_starting_segment (simple_media_playlist,
hlsdemux->main_stream->llhls_enabled, &seek_result)) {