vkencoder-private: check for layered buffer when new picture

And balance `if` curly brackets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
This commit is contained in:
Víctor Manuel Jáquez Leal 2024-11-26 16:22:47 +01:00 committed by GStreamer Marge Bot
parent 066144f78c
commit e9ef5e0c36

View file

@ -437,9 +437,10 @@ gst_vulkan_encode_picture_new (GstVulkanEncoder * self, GstBuffer * in_buffer,
g_return_val_if_fail (in_buffer && GST_IS_BUFFER (in_buffer), NULL);
pic = g_new0 (GstVulkanEncodePicture, 1);
if (priv->layered_dpb)
if (priv->layered_dpb) {
g_assert (priv->layered_buffer);
pic->dpb_buffer = gst_buffer_ref (priv->layered_buffer);
else {
} else {
GstFlowReturn ret;
ret =
gst_buffer_pool_acquire_buffer (priv->dpb_pool, &pic->dpb_buffer, NULL);