summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2020-04-15 12:36:29 -0400
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-09-28 11:23:03 +0000
commit71f582c750c1624d5a4f6b58662791bbf1ff7af5 (patch)
treefaedfe578a54b90b998890ee3637238a4037951e
parent3b48d7288364dfa7afca203cb33157814685b8f3 (diff)
v4l2videodec: Increase internal bitstream pool size
This patch will now set the maximum of buffers to 32, allowing to grow the pool for drivers that supports that and will respect the minimum buffers reported by the driver. This was made to fix a stall with the virtio CODEC driver. Fixes #672 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/738>
-rw-r--r--sys/v4l2/gstv4l2videodec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/v4l2/gstv4l2videodec.c b/sys/v4l2/gstv4l2videodec.c
index a25bf1bb8..adb620d79 100644
--- a/sys/v4l2/gstv4l2videodec.c
+++ b/sys/v4l2/gstv4l2videodec.c
@@ -610,8 +610,11 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
/* Ensure input internal pool is active */
if (!gst_buffer_pool_is_active (pool)) {
GstStructure *config = gst_buffer_pool_get_config (pool);
+ guint min = MAX (self->v4l2output->min_buffers, GST_V4L2_MIN_BUFFERS);
+ guint max = VIDEO_MAX_FRAME;
+
gst_buffer_pool_config_set_params (config, self->input_state->caps,
- self->v4l2output->info.size, 2, 2);
+ self->v4l2output->info.size, min, max);
/* There is no reason to refuse this config */
if (!gst_buffer_pool_set_config (pool, config))