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, 15 Apr 2013 06:19:55 +0000 (08:19 +0200)
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 72448a6eed11d6e1ce035781646825e0b10fe403..9a188269748b379b2ecb9cee2d1c266f04dae0bb 100644 (file)
@@ -2579,7 +2579,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;
     }
   }