mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
dashdemux: return the error to the source immediately to stop faster
When flushing, this will prevent dashdemux from trying to download more fragments or more chunks of the same fragment before stopping. Also improves the error handling to not transform everything non-ok into an error. https://bugzilla.gnome.org/show_bug.cgi?id=734014
This commit is contained in:
parent
1685c45465
commit
24815a5feb
1 changed files with 5 additions and 7 deletions
|
@ -1974,11 +1974,10 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
|
||||
/* TODO properly stop tasks */
|
||||
/* gst_hls_demux_pause_tasks (demux); */
|
||||
g_cond_signal (&stream->fragment_download_cond);
|
||||
}
|
||||
|
||||
/* avoid having the source handle the same error again */
|
||||
stream->last_ret = ret;
|
||||
ret = GST_FLOW_OK;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -2317,7 +2316,6 @@ static GstFlowReturn
|
|||
gst_dash_demux_stream_get_next_fragment (GstDashDemuxStream * stream,
|
||||
GstClockTime * ts)
|
||||
{
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
GstDashDemux *demux = stream->demux;
|
||||
|
||||
if (stream->stream_eos)
|
||||
|
@ -2358,11 +2356,11 @@ gst_dash_demux_stream_get_next_fragment (GstDashDemuxStream * stream,
|
|||
|
||||
demux->end_of_period = FALSE;
|
||||
|
||||
if (stream->last_ret < GST_FLOW_EOS) {
|
||||
GST_WARNING_OBJECT (stream->pad, "Failed to download fragment");
|
||||
return GST_FLOW_ERROR;
|
||||
if (stream->last_ret != GST_FLOW_OK) {
|
||||
GST_WARNING_OBJECT (stream->pad, "Failed to download fragment: %s",
|
||||
gst_flow_get_name (stream->last_ret));
|
||||
}
|
||||
return ret;
|
||||
return stream->last_ret;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue