mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
dashdemux: check for errors between downloads
To abort earlier in case of failures
This commit is contained in:
parent
b5998a4c3b
commit
15952dcd8e
1 changed files with 16 additions and 0 deletions
|
@ -2170,12 +2170,23 @@ gst_dash_demux_stream_download_fragment (GstDashDemux * demux,
|
|||
GST_TIME_ARGS (fragment->duration),
|
||||
fragment->range_start, fragment->range_end);
|
||||
|
||||
/* Reset last flow return */
|
||||
stream->last_ret = GST_FLOW_OK;
|
||||
|
||||
if (stream->need_header) {
|
||||
/* We need to fetch a new header */
|
||||
gst_dash_demux_get_next_header (demux, stream);
|
||||
stream->need_header = FALSE;
|
||||
}
|
||||
|
||||
if (stream->last_ret != GST_FLOW_OK) {
|
||||
GST_WARNING_OBJECT (stream->pad, "Failed to download headers");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (demux->cancelled)
|
||||
goto exit;
|
||||
|
||||
/* it is possible to have an index per fragment, so check and download */
|
||||
if (fragment->index_uri || fragment->index_range_start
|
||||
|| fragment->index_range_end != -1) {
|
||||
|
@ -2192,6 +2203,11 @@ gst_dash_demux_stream_download_fragment (GstDashDemux * demux,
|
|||
fragment->index_range_start, fragment->index_range_end);
|
||||
}
|
||||
|
||||
if (stream->last_ret != GST_FLOW_OK) {
|
||||
GST_WARNING_OBJECT (stream->pad, "Failed to download fragment headers");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (demux->cancelled)
|
||||
goto exit;
|
||||
|
||||
|
|
Loading…
Reference in a new issue