From 066144f78c00d86f4e1c66dba0f3984c03de373d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 3 Oct 2024 22:31:54 +0200 Subject: [PATCH] vkencoder-private: early return if dpb pool or dpb buffer already exist Part-of: --- .../gst-libs/gst/vulkan/gstvkencoder-private.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkencoder-private.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkencoder-private.c index 15b3080fb4..1b14819d8f 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkencoder-private.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkencoder-private.c @@ -983,6 +983,10 @@ gst_vulkan_encoder_create_dpb_pool (GstVulkanEncoder * self, GstCaps * caps) if (!priv->started) return FALSE; + if ((!priv->layered_dpb && priv->dpb_pool) + || (priv->layered_dpb && priv->layered_buffer)) + return TRUE; + if (priv->layered_dpb) { min_buffers = max_buffers = 1; } else {