v4l2bufferpool: Activate the other pool first
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 13 Jul 2018 18:42:21 +0000 (14:42 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 27 Aug 2018 17:41:30 +0000 (13:41 -0400)
This change has no effect. We will need to acquire a buffer from the
pool later in order to validate / adapt with the video alignment for
the downstream buffers.

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

sys/v4l2/gstv4l2bufferpool.c

index 7dd862f..9eba369 100644 (file)
@@ -742,6 +742,10 @@ gst_v4l2_buffer_pool_start (GstBufferPool * bpool)
 
   GST_DEBUG_OBJECT (pool, "activating pool");
 
+  if (pool->other_pool)
+    if (!gst_buffer_pool_set_active (pool->other_pool, TRUE))
+      goto other_pool_failed;
+
   config = gst_buffer_pool_get_config (bpool);
   if (!gst_buffer_pool_config_get_params (config, &caps, &size, &min_buffers,
           &max_buffers))
@@ -861,10 +865,6 @@ gst_v4l2_buffer_pool_start (GstBufferPool * bpool)
   pclass->set_config (bpool, config);
   gst_structure_free (config);
 
-  if (pool->other_pool)
-    if (!gst_buffer_pool_set_active (pool->other_pool, TRUE))
-      goto other_pool_failed;
-
   /* now, allocate the buffers: */
   if (!pclass->start (bpool))
     goto start_failed;