mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
vaapivideobufferpool: split caps validation
When validating the caps from bufferpool config, this patch distinguishes the error from no caps received (NULL) from the invalid caps (cannot be converted into GstVideoInfo structure).
This commit is contained in:
parent
1f5ba28bd0
commit
21b184284b
1 changed files with 8 additions and 1 deletions
|
@ -145,8 +145,10 @@ gst_vaapi_video_buffer_pool_set_config (GstBufferPool * pool,
|
|||
|
||||
if (!gst_buffer_pool_config_get_params (config, &caps, NULL, NULL, NULL))
|
||||
goto error_invalid_config;
|
||||
if (!caps || !gst_video_info_from_caps (new_vip, caps))
|
||||
if (!caps)
|
||||
goto error_no_caps;
|
||||
if (!gst_video_info_from_caps (new_vip, caps))
|
||||
goto error_invalid_caps;
|
||||
|
||||
use_dmabuf_memory = gst_buffer_pool_config_has_option (config,
|
||||
GST_BUFFER_POOL_OPTION_DMABUF_MEMORY);
|
||||
|
@ -218,6 +220,11 @@ error_no_caps:
|
|||
GST_ERROR_OBJECT (pool, "no valid caps in config");
|
||||
return FALSE;
|
||||
}
|
||||
error_invalid_caps:
|
||||
{
|
||||
GST_ERROR_OBJECT (pool, "invalid caps %" GST_PTR_FORMAT, caps);
|
||||
return FALSE;
|
||||
}
|
||||
error_create_allocator:
|
||||
{
|
||||
GST_ERROR_OBJECT (pool, "failed to create GstVaapiVideoAllocator object");
|
||||
|
|
Loading…
Reference in a new issue