mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 16:51:10 +00:00
adaptivedemux: Error out if downloading a segment failed too often in live mode
It's true that we shouldn't consider errors fatal immediately, but if we always ignore them we will loop infinitely on live streams with segments that can't be downloaded at all.
This commit is contained in:
parent
adcf3f48a5
commit
4dd355cea2
1 changed files with 5 additions and 3 deletions
|
@ -1896,12 +1896,14 @@ gst_adaptive_demux_stream_download_fragment (GstAdaptiveDemuxStream * stream)
|
|||
if (ret != GST_FLOW_OK) {
|
||||
/* TODO check if we are truly stoping */
|
||||
if (ret != GST_FLOW_ERROR && gst_adaptive_demux_is_live (demux)) {
|
||||
if (++stream->download_error_count <= MAX_DOWNLOAD_ERROR_COUNT) {
|
||||
/* looks like there is no way of knowing when a live stream has ended
|
||||
* Have to assume we are falling behind and cause a manifest reload */
|
||||
return GST_FLOW_EOS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
|
|
Loading…
Reference in a new issue