basesrc: call _stop when start failed
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 13 Dec 2012 13:48:35 +0000 (14:48 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 14 Dec 2012 14:33:00 +0000 (15:33 +0100)
When we failed to complete the start, call stop again. This makes sure that all
successfull calls to _start are paired with a _stop.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=687845

libs/gst/base/gstbasesrc.c

index f8f3302c29821cb4569c1b12f19ec442069a1924..12ba9a2fc5914027a76b8d7df3723d1f972cd7b6 100644 (file)
@@ -3265,7 +3265,7 @@ seek_failed:
   {
     GST_PAD_STREAM_UNLOCK (basesrc->srcpad);
     GST_ERROR_OBJECT (basesrc, "Failed to perform initial seek");
-    gst_base_src_set_flushing (basesrc, TRUE, FALSE, NULL);
+    gst_base_src_stop (basesrc);
     if (event)
       gst_event_unref (event);
     ret = GST_FLOW_ERROR;
@@ -3274,7 +3274,7 @@ seek_failed:
 no_get_range:
   {
     GST_PAD_STREAM_UNLOCK (basesrc->srcpad);
-    gst_base_src_set_flushing (basesrc, TRUE, FALSE, NULL);
+    gst_base_src_stop (basesrc);
     GST_ERROR_OBJECT (basesrc, "Cannot operate in pull mode, stopping");
     ret = GST_FLOW_ERROR;
     goto error;