mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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
This commit is contained in:
parent
18b53c2236
commit
b9532fc6fb
1 changed files with 3 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue