From a2ffe7e9792365a998cb68f7a8330a85b7dc360b Mon Sep 17 00:00:00 2001 From: Florin Apostol Date: Fri, 30 Oct 2015 12:49:20 +0000 Subject: [PATCH] adaptivedemux: stop task on multiple download errors On multiple download errors, we stop the download task and change the src element state to NULL. https://bugzilla.gnome.org/show_bug.cgi?id=756240 --- gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index 7095c84252..928bfef1d4 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -2799,6 +2799,13 @@ download_error: "Download error: Couldn't download fragments, too many failures"); } + gst_task_stop (stream->download_task); + if (stream->src) { + gst_element_set_state (stream->src, GST_STATE_NULL); + gst_bin_remove (GST_BIN_CAST (demux), stream->src); + stream->src = NULL; + } + gst_element_post_message (GST_ELEMENT_CAST (demux), msg); goto end;