mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
hlsdemux2: Use variant stream as support for synchronizing playlists
When matching playlists, there is a possibility that rendition streams will not have been updated in time (for example because that stream started later, or playback was paused). This would cause several playback failures and seeking failures. In order to still fall back on our feet, attempt to synchronize that rendition playlist against the current variant playlist. This will attempt to match the stream time using SN/DNS/PDT/... Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
This commit is contained in:
parent
87ab729551
commit
b9effe04e3
1 changed files with 14 additions and 4 deletions
|
@ -1955,11 +1955,21 @@ gst_hls_demux_stream_update_media_playlist (GstHLSDemux * demux,
|
|||
if (stream->playlist) {
|
||||
if (!gst_hls_media_playlist_sync_to_playlist (new_playlist,
|
||||
stream->playlist)) {
|
||||
/* FIXME : We need to have a way to re-calculate sync ! */
|
||||
/* Failure to sync is only fatal for variant streams. */
|
||||
if (stream->is_variant) {
|
||||
GST_ERROR_OBJECT (stream,
|
||||
"Could not synchronize new playlist with previous one !");
|
||||
"Could not synchronize new variant playlist with previous one !");
|
||||
return FALSE;
|
||||
}
|
||||
/* For rendition streams, we can attempt synchronization against the
|
||||
* variant playlist which is constantly updated */
|
||||
if (!gst_hls_media_playlist_sync_to_playlist (new_playlist,
|
||||
demux->main_stream->playlist)) {
|
||||
GST_ERROR_OBJECT (stream,
|
||||
"Could not do fallback synchronization of rendition stream to variant stream");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (stream->current_segment) {
|
||||
|
|
Loading…
Reference in a new issue