From d9af84426bfea003e06c4f389f4d1666c3515340 Mon Sep 17 00:00:00 2001 From: Lynne Date: Tue, 13 Jun 2023 06:13:10 +0200 Subject: [PATCH] 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(+) diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c index 3c348c533f..afcdcd8021 100644 --- a/libavcodec/vulkan_decode.c +++ b/libavcodec/vulkan_decode.c @@ -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)