v4l2transform: Flush buffer pools on flush stop
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 14 May 2014 19:12:26 +0000 (15:12 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 15 May 2014 16:21:40 +0000 (12:21 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=730207

sys/v4l2/gstv4l2transform.c

index 8ad7ada..aecd530 100644 (file)
@@ -539,6 +539,12 @@ gst_v4l2_transform_sink_event (GstBaseTransform * trans, GstEvent * event)
       break;
     case GST_EVENT_FLUSH_STOP:
       GST_DEBUG_OBJECT (self, "flush stop");
+      if (self->v4l2output->pool)
+        gst_v4l2_buffer_pool_flush (GST_V4L2_BUFFER_POOL (self->v4l2output->
+                pool));
+      if (self->v4l2capture->pool)
+        gst_v4l2_buffer_pool_flush (GST_V4L2_BUFFER_POOL (self->v4l2capture->
+                pool));
       gst_v4l2_object_unlock_stop (self->v4l2output);
       gst_v4l2_object_unlock_stop (self->v4l2capture);
     default: