Commit: 0597902bde1f6d9a77bf04144ad7fd5f7be9d651
Author: Sebastian Parborg
Date: Mon Mar 7 19:02:34 2022 +0100
Branches: master
https://developer.blender.org/rB0597902bde1f6d9a77bf04144ad7fd5f7be9d651
Fix memory leak when reading ffmpeg video frames.
We had forgotten to unref packets after reading them.
This lead to a memory leak inside of ffmpeg.
===================================================================
M source/blender/imbuf/intern/anim_movie.c
===================================================================
diff --git a/source/blender/imbuf/intern/anim_movie.c
b/source/blender/imbuf/intern/anim_movie.c
index 7cde49f44b7..096089d4c41 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -874,6 +874,8 @@ static int ffmpeg_read_video_frame(struct anim *anim,
AVPacket *packet)
if (packet->stream_index == anim->videoStream) {
break;
}
+ av_packet_unref(packet);
+ packet->stream_index = -1;
}
return ret;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs