Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2022-10-20 18:54:29 +0300
committerRichard Antalik <richardantalik@gmail.com>2022-10-20 18:59:23 +0300
commit24fd8f729a58b18159912a84525b910b0d4e7ef5 (patch)
tree62ce1a1ff0f4e34450adf62929b7461163c3baa8
parent4b30ee773ce7f5e423830195e49ca06763ba230a (diff)
Fix memory leak when proxy building fails
Leak introduced in recent fix - bf8d4a9bc6fb28.
-rw-r--r--source/blender/imbuf/intern/indexer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index e8e4b80ef45..eaa72441fb6 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -909,6 +909,9 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim,
if (context->proxy_ctx[0] == NULL && context->proxy_ctx[1] == NULL &&
context->proxy_ctx[2] == NULL && context->proxy_ctx[3] == NULL) {
+ avformat_close_input(&context->iFormatCtx);
+ avcodec_free_context(&context->iCodecCtx);
+ MEM_freeN(context);
return NULL; /* Nothing to transcode. */
}