mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
v4l2videoenc: fix activation of internal pool
Fix the buffer pool activation if the driver does not support VIDIOC_CREATE_BUFS the same way as it was fixed for the v4l2videodec. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4235>
This commit is contained in:
parent
5e72e1985a
commit
41ce99ebab
1 changed files with 16 additions and 3 deletions
|
@ -793,9 +793,22 @@ gst_v4l2_video_enc_handle_frame (GstVideoEncoder * encoder,
|
|||
|
||||
/* There is no reason to refuse this config */
|
||||
if (!gst_buffer_pool_set_config (opool, config)) {
|
||||
if (opool)
|
||||
gst_object_unref (opool);
|
||||
goto activate_failed;
|
||||
config = gst_buffer_pool_get_config (opool);
|
||||
|
||||
if (gst_buffer_pool_config_validate_params (config,
|
||||
self->input_state->caps, self->v4l2output->info.size, min,
|
||||
min)) {
|
||||
gst_structure_free (config);
|
||||
if (opool)
|
||||
gst_object_unref (opool);
|
||||
goto activate_failed;
|
||||
}
|
||||
|
||||
if (!gst_buffer_pool_set_config (opool, config)) {
|
||||
if (opool)
|
||||
gst_object_unref (opool);
|
||||
goto activate_failed;
|
||||
}
|
||||
}
|
||||
|
||||
if (!gst_buffer_pool_set_active (opool, TRUE)) {
|
||||
|
|
Loading…
Reference in a new issue