mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
vaapivideobufferpool: check for vaapi meta first
If the configured meta doesn't request vaapi meta then it is not a vaapi buffer pool. Bail out as soon as possible.
This commit is contained in:
parent
ed505f5ed4
commit
377dd0cc6c
1 changed files with 4 additions and 4 deletions
|
@ -154,6 +154,10 @@ gst_vaapi_video_buffer_pool_set_config (GstBufferPool * pool,
|
|||
if (!gst_video_info_from_caps (&new_allocation_vinfo, caps))
|
||||
goto error_invalid_caps;
|
||||
|
||||
if (!gst_buffer_pool_config_has_option (config,
|
||||
GST_BUFFER_POOL_OPTION_VAAPI_VIDEO_META))
|
||||
goto error_no_vaapi_video_meta_option;
|
||||
|
||||
allocator = NULL;
|
||||
if (!gst_buffer_pool_config_get_allocator (config, &allocator, NULL))
|
||||
goto error_invalid_allocator;
|
||||
|
@ -198,10 +202,6 @@ gst_vaapi_video_buffer_pool_set_config (GstBufferPool * pool,
|
|||
}
|
||||
}
|
||||
|
||||
if (!gst_buffer_pool_config_has_option (config,
|
||||
GST_BUFFER_POOL_OPTION_VAAPI_VIDEO_META))
|
||||
goto error_no_vaapi_video_meta_option;
|
||||
|
||||
/* create a new allocator if needed */
|
||||
if (!allocator) {
|
||||
if (priv->use_dmabuf_memory) {
|
||||
|
|
Loading…
Reference in a new issue