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
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-01-29 11:55:39 +01:00
parent 5eca31b5e8
commit 62f3329455

View file

@ -166,14 +166,8 @@ gst_vaapi_video_buffer_pool_set_config (GstBufferPool * pool,
if (allocator if (allocator
&& (g_strcmp0 (allocator->mem_type, GST_VAAPI_VIDEO_MEMORY_NAME) != 0 && (g_strcmp0 (allocator->mem_type, GST_VAAPI_VIDEO_MEMORY_NAME) != 0
&& g_strcmp0 (allocator->mem_type, && g_strcmp0 (allocator->mem_type,
GST_VAAPI_DMABUF_ALLOCATOR_NAME) != 0)) { GST_VAAPI_DMABUF_ALLOCATOR_NAME) != 0))
/* if pool has already an allocator, try it and ignore the one in goto error_invalid_allocator;
* configuration */
if (priv->allocator)
allocator = priv->allocator;
else
allocator = NULL;
}
/* get the allocator properties */ /* get the allocator properties */
if (allocator) { if (allocator) {