Commit b9532fc6 authored by Nicolas Dufresne's avatar Nicolas Dufresne

v4l2videoenc: Make sure min_buffers is valid

When upstream does no use the v4l2videoenc pool, we need to activate
that internal pool. Though, we relied the driver to provide a minimum
required buffer, which Qualcomm Venus driver don't currently provide.

https://bugzilla.gnome.org/show_bug.cgi?id=783361
parent 18b53c22
......@@ -514,9 +514,10 @@ gst_v4l2_video_enc_handle_frame (GstVideoEncoder * encoder,
/* 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);
gst_buffer_pool_config_set_params (config, self->input_state->caps,
self->v4l2output->info.size, self->v4l2output->min_buffers,
self->v4l2output->min_buffers);
self->v4l2output->info.size, min, min);
/* There is no reason to refuse this config */
if (!gst_buffer_pool_set_config (pool, config))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment