vkimagebufferpool: reset the number of profiles at set_config()

Virtual method set_config() can be called several times, and if the number of
profiles counter isn't reset the pool will reach an error state.

The purpose of number of profiles is to check the number of valid vulkan video
profiles (two in the case of transcoding use-case, for example) so it's local to
set_config() virtual method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
This commit is contained in:
Víctor Manuel Jáquez Leal 2024-07-23 14:07:26 +02:00
parent d8e384085a
commit 541e2e93ca

View file

@ -208,6 +208,8 @@ gst_vulkan_image_buffer_pool_set_config (GstBufferPool * pool,
#if GST_VULKAN_HAVE_VIDEO_EXTENSIONS
{
guint n = 0;
priv->n_profiles = 0;
if (decode_caps && ((priv->usage
& (VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR
| VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR)) != 0)) {