mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
v4l2videodec: Fix activation of internal pool
If the driver does not support VIDIOC_CREATE_BUFS ioctl, the pool configuration may get changed, which requires a validation. This would fail to activate a pool in a case it shouldn't normally fail unless we are out of memory. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2677>
This commit is contained in:
parent
3f3604f4e2
commit
d9ebd9203c
1 changed files with 13 additions and 2 deletions
|
@ -719,8 +719,19 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
|
|||
self->v4l2output->info.size, min, max);
|
||||
|
||||
/* There is no reason to refuse this config */
|
||||
if (!gst_buffer_pool_set_config (pool, config)) {
|
||||
config = gst_buffer_pool_get_config (pool);
|
||||
|
||||
if (!gst_buffer_pool_config_validate_params (config,
|
||||
self->input_state->caps, self->v4l2output->info.size, min,
|
||||
max)) {
|
||||
gst_structure_free (config);
|
||||
goto activate_failed;
|
||||
}
|
||||
|
||||
if (!gst_buffer_pool_set_config (pool, config))
|
||||
goto activate_failed;
|
||||
}
|
||||
|
||||
if (!gst_buffer_pool_set_active (pool, TRUE))
|
||||
goto activate_failed;
|
||||
|
|
Loading…
Reference in a new issue