mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
hlsdemux: Also refetch the playlist after the first fragment failure
Previously we only refetched the playlist if downloading a fragment has failed once. We should also do that if it failed a second or third time, chances are that the playlist was updated now and contains new URIs.
This commit is contained in:
parent
1ce7d89868
commit
775c5600c9
1 changed files with 7 additions and 0 deletions
|
@ -1211,6 +1211,7 @@ gst_hls_demux_stream_loop (GstHLSDemux * demux)
|
|||
&& !gst_m3u8_client_is_live (demux->client)
|
||||
&& gst_hls_demux_update_playlist (demux, FALSE, &err)) {
|
||||
/* Retry immediately, the playlist actually has changed */
|
||||
GST_DEBUG_OBJECT (demux, "Updated the playlist");
|
||||
return;
|
||||
} else {
|
||||
/* Wait half the fragment duration before retrying */
|
||||
|
@ -1231,6 +1232,12 @@ gst_hls_demux_stream_loop (GstHLSDemux * demux)
|
|||
demux->next_download);
|
||||
g_mutex_unlock (&demux->download_lock);
|
||||
GST_DEBUG_OBJECT (demux, "Retrying now");
|
||||
|
||||
/* Refetch the playlist now after we waited */
|
||||
if (!gst_m3u8_client_is_live (demux->client)
|
||||
&& gst_hls_demux_update_playlist (demux, FALSE, &err)) {
|
||||
GST_DEBUG_OBJECT (demux, "Updated the playlist");
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
GST_ELEMENT_ERROR_FROM_ERROR (demux,
|
||||
|
|
Loading…
Reference in a new issue