aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2023-06-13 06:13:10 +0200
committerLynne <dev@lynne.ee>2023-06-22 18:17:53 +0200
commitd9af84426bfea003e06c4f389f4d1666c3515340 (patch)
tree712ba4a8465b7c89cd0af741f28a1f8a77f2b75b
parent13ff3aa9e74508c735b57f73767aac6912c429aa (diff)
downloadffmpeg-d9af84426bfea003e06c4f389f4d1666c3515340.tar.gz
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.
-rw-r--r--libavcodec/vulkan_decode.c2
1 files changed, 2 insertions, 0 deletions
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)