v4l2transform: set right buffer count.
authorSong Bing <bing.song@nxp.com>
Mon, 15 Apr 2019 23:32:03 +0000 (16:32 -0700)
committerNicolas Dufresne <nicolas@ndufresne.ca>
Thu, 4 Jul 2019 17:37:30 +0000 (17:37 +0000)
Set right buffer count to avoid one buffer.

sys/v4l2/gstv4l2transform.c

index 6bb7fee..e2adc63 100644 (file)
@@ -893,8 +893,7 @@ gst_v4l2_transform_prepare_output_buffer (GstBaseTransform * trans,
   /* Ensure input internal pool is active */
   if (!gst_buffer_pool_is_active (pool)) {
     GstStructure *config = gst_buffer_pool_get_config (pool);
-    gint min = self->v4l2output->min_buffers == 0 ? GST_V4L2_MIN_BUFFERS :
-        self->v4l2output->min_buffers;
+    gint min = MAX (GST_V4L2_MIN_BUFFERS, self->v4l2output->min_buffers);
     gst_buffer_pool_config_set_params (config, self->incaps,
         self->v4l2output->info.size, min, min);