summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-01-29 11:55:39 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-02-02 17:22:43 +0100
commit62f3329455b180739492a38a2ac61de22d61eeb6 (patch)
tree059be9a27587a9432bbde8f5b349aa4d4acd485c /gst
parent5eca31b5e864157d7012d166cb5685a39cf2bc17 (diff)
vaapivideobufferpool: reject configuration if allocator isn't vaapi
If the requested allocator in set_config() is not a VAAPI valid one, reject the configuration, instead of lying and using a private one. This patch superseeds !254 and !24
Diffstat (limited to 'gst')
-rw-r--r--gst/vaapi/gstvaapivideobufferpool.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gst/vaapi/gstvaapivideobufferpool.c b/gst/vaapi/gstvaapivideobufferpool.c
index a331d4ff..d99f306e 100644
--- a/gst/vaapi/gstvaapivideobufferpool.c
+++ b/gst/vaapi/gstvaapivideobufferpool.c
@@ -166,14 +166,8 @@ gst_vaapi_video_buffer_pool_set_config (GstBufferPool * pool,
if (allocator
&& (g_strcmp0 (allocator->mem_type, GST_VAAPI_VIDEO_MEMORY_NAME) != 0
&& g_strcmp0 (allocator->mem_type,
- GST_VAAPI_DMABUF_ALLOCATOR_NAME) != 0)) {
- /* if pool has already an allocator, try it and ignore the one in
- * configuration */
- if (priv->allocator)
- allocator = priv->allocator;
- else
- allocator = NULL;
- }
+ GST_VAAPI_DMABUF_ALLOCATOR_NAME) != 0))
+ goto error_invalid_allocator;
/* get the allocator properties */
if (allocator) {