adaptivedemux: return error if src element cannot start
authorFlorin Apostol <florin.apostol@oregan.net>
Wed, 7 Oct 2015 22:20:51 +0000 (23:20 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 30 Oct 2015 12:17:40 +0000 (12:17 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=756209

gst-libs/gst/adaptivedemux/gstadaptivedemux.c

index 5ce31be..8f46355 100644 (file)
@@ -2261,7 +2261,12 @@ gst_adaptive_demux_stream_download_uri (GstAdaptiveDemux * demux,
 
       GST_MANIFEST_UNLOCK (demux);
 
-      gst_element_sync_state_with_parent (stream->src);
+      if (!gst_element_sync_state_with_parent (stream->src)) {
+        GST_WARNING_OBJECT (demux, "Could not sync state for src element");
+        GST_MANIFEST_LOCK (demux);
+        ret = stream->last_ret = GST_FLOW_ERROR;
+        return ret;
+      }
 
       /* wait for the fragment to be completely downloaded */
       GST_DEBUG_OBJECT (stream->pad,