summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-01-29 11:54:38 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-02-02 17:22:43 +0100
commit377dd0cc6c8afe90404fa4f8419fb79dc88d601b (patch)
tree968abe999888bdff7dd8fd385f40ccc067ed54ac
parented505f5ed412f8fc52e69bf6f6b62a676d1b3831 (diff)
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.
-rw-r--r--gst/vaapi/gstvaapivideobufferpool.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/vaapi/gstvaapivideobufferpool.c b/gst/vaapi/gstvaapivideobufferpool.c
index 09744f97..d6f47522 100644
--- a/gst/vaapi/gstvaapivideobufferpool.c
+++ b/gst/vaapi/gstvaapivideobufferpool.c
@@ -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) {