basesrc: Don't send error if negotiate fails because we are flushing
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Fri, 22 Mar 2013 01:00:54 +0000 (21:00 -0400)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 25 Mar 2013 07:57:06 +0000 (08:57 +0100)
Negotiation may be aborted by a flush from another thread that need to
stop the task (i.e. seek). Check that case and silently pause the task.

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

libs/gst/base/gstbasesrc.c

index 9aea2ce..ef9b154 100644 (file)
@@ -2581,7 +2581,10 @@ gst_base_src_loop (GstPad * pad)
   if (gst_pad_check_reconfigure (pad)) {
     if (!gst_base_src_negotiate (src)) {
       gst_pad_mark_reconfigure (pad);
-      goto negotiate_failed;
+      if (GST_PAD_IS_FLUSHING (pad))
+        goto flushing;
+      else
+        goto negotiate_failed;
     }
   }