dashdemux: check for errors between downloads
To abort earlier in case of failures
This commit is contained in:
parent
b5998a4c3b
commit
15952dcd8e
@ -2170,12 +2170,23 @@ gst_dash_demux_stream_download_fragment (GstDashDemux * demux,
|
|||||||
GST_TIME_ARGS (fragment->duration),
|
GST_TIME_ARGS (fragment->duration),
|
||||||
fragment->range_start, fragment->range_end);
|
fragment->range_start, fragment->range_end);
|
||||||
|
|
||||||
|
/* Reset last flow return */
|
||||||
|
stream->last_ret = GST_FLOW_OK;
|
||||||
|
|
||||||
if (stream->need_header) {
|
if (stream->need_header) {
|
||||||
/* We need to fetch a new header */
|
/* We need to fetch a new header */
|
||||||
gst_dash_demux_get_next_header (demux, stream);
|
gst_dash_demux_get_next_header (demux, stream);
|
||||||
stream->need_header = FALSE;
|
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 */
|
/* it is possible to have an index per fragment, so check and download */
|
||||||
if (fragment->index_uri || fragment->index_range_start
|
if (fragment->index_uri || fragment->index_range_start
|
||||||
|| fragment->index_range_end != -1) {
|
|| 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);
|
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)
|
if (demux->cancelled)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user