From 541e2e93ca48a8b8fe280b91d1e6d4a061fff52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 23 Jul 2024 14:07:26 +0200 Subject: [PATCH] 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: --- .../gst-plugins-bad/gst-libs/gst/vulkan/gstvkimagebufferpool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkimagebufferpool.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkimagebufferpool.c index 60f14f414f..fff291c695 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkimagebufferpool.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkimagebufferpool.c @@ -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)) {