From 1a5ba5950413136bd5b96052c7eb8313994dbc07 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sat, 9 Feb 2019 12:26:07 +0100 Subject: [PATCH] Fix memory leak on close The buffer associated to the AVIOContext must be freed. --- app/src/decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/decoder.c b/app/src/decoder.c index fd429147..6e074e7a 100644 --- a/app/src/decoder.c +++ b/app/src/decoder.c @@ -284,7 +284,8 @@ run_quit: run_finally_close_input: avformat_close_input(&format_ctx); run_finally_free_avio_ctx: - av_freep(&avio_ctx); + av_free(avio_ctx->buffer); + av_free(avio_ctx); run_finally_free_format_ctx: avformat_free_context(format_ctx); run_finally_close_codec: