v4l2pool: Deactivate other pool
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Wed, 18 Feb 2015 01:26:55 +0000 (20:26 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Wed, 18 Feb 2015 14:05:37 +0000 (09:05 -0500)
When importing buffers from a downstream pool, we need to deactivate
that pool to ensure it will be usable again later. Relying on the
refcount to reach zero does not work, since elements like xvimagesink
keeps a reference on their proposed pool.

sys/v4l2/gstv4l2bufferpool.c

index c3ceb25..fa27a96 100644 (file)
@@ -822,6 +822,7 @@ gst_v4l2_buffer_pool_stop (GstBufferPool * bpool)
   }
 
   if (pool->other_pool) {
+    gst_buffer_pool_set_active (pool->other_pool, FALSE);
     gst_object_unref (pool->other_pool);
     pool->other_pool = NULL;
   }