mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
adaptivedemux: If downloading the last fragment fails, consider this as EOS and not ERROR
Sometimes the last fragment does not exist because of rounding errors with the durations. Just finish the stream gracefully instead of erroring out instead.
This commit is contained in:
parent
d5a39896dc
commit
a78c1bdad5
1 changed files with 10 additions and 0 deletions
|
@ -1935,8 +1935,18 @@ gst_adaptive_demux_stream_download_fragment (GstAdaptiveDemuxStream * stream)
|
|||
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 */
|
||||
GST_DEBUG_OBJECT (stream->pad,
|
||||
"Converting error of live stream to EOS");
|
||||
return GST_FLOW_EOS;
|
||||
}
|
||||
} else if (ret != GST_FLOW_ERROR
|
||||
&& !gst_adaptive_demux_stream_has_next_fragment (demux, stream)) {
|
||||
/* If this is the last fragment, consider failures EOS and not actual
|
||||
* errors. Due to rounding errors in the durations, the last fragment
|
||||
* might not actually exist */
|
||||
GST_DEBUG_OBJECT (stream->pad,
|
||||
"Converting error for last fragment to EOS");
|
||||
return GST_FLOW_EOS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue