mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
adaptivedemux: Actually wait for playlist update when requested
There are several cases where a HLS server could temporarily have wrong fragments, or reconfigure the playlist. In those cases, when we get fragment download failures, we *really* want to wait a bit (for the next playlist update) before retrying to get fragments. Previously this method was first checking to see if there was next fragments (according to the previous manifest update) before waiting for the next update. The problem was that if that if there is a temporary failure on the server, that's uncorrelated to whether the manifest contains next fragments or not.
This commit is contained in:
parent
c90f6b990b
commit
69867f95e2
1 changed files with 3 additions and 3 deletions
|
@ -1645,6 +1645,9 @@ gst_adaptive_demux_stream_wait_manifest_update (GstAdaptiveDemux * demux,
|
|||
break;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (demux, "No fragment left but live playlist, wait a bit");
|
||||
g_cond_wait (&demux->manifest_cond, GST_MANIFEST_GET_LOCK (demux));
|
||||
|
||||
/* Got a new fragment or not live anymore? */
|
||||
if (gst_adaptive_demux_stream_has_next_fragment (demux, stream)) {
|
||||
GST_DEBUG_OBJECT (demux, "new fragment available, "
|
||||
|
@ -1659,9 +1662,6 @@ gst_adaptive_demux_stream_wait_manifest_update (GstAdaptiveDemux * demux,
|
|||
ret = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (demux, "No fragment left but live playlist, wait a bit");
|
||||
g_cond_wait (&demux->manifest_cond, GST_MANIFEST_GET_LOCK (demux));
|
||||
}
|
||||
GST_DEBUG_OBJECT (demux, "Retrying now");
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue