From 7d8f1c73308dd29dbf2d46dc09d85808aa1cc6be Mon Sep 17 00:00:00 2001
From: Lynne <dev@lynne.ee>
Date: Tue, 13 Jun 2023 06:13:10 +0200
Subject: [PATCH 5/5] vulkan_decode: fix small memory leak
This requires using the new AVHWFramesContext.opaque field, as
otherwise, the profile attached to the decoder will be freed
before the frames context, rendering the frames context useless.
---
libavcodec/vulkan_decode.c | 2 ++
1 file changed, 2 insertions(+)
@@ -584,6 +584,8 @@ static void free_common(void *opaque, uint8_t *data)
s->hwctx->alloc);
ff_vk_uninit(s);
+
+ av_free(ctx);
}
static int vulkan_decode_bootstrap(AVCodecContext *avctx, AVBufferRef *frames_ref)
--
2.40.1