diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2022-03-07 21:02:34 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2022-03-07 21:04:51 +0300 |
commit | 0597902bde1f6d9a77bf04144ad7fd5f7be9d651 (patch) | |
tree | 2b0ba09a2eecf03376f875a33dace7b06a327ce8 /source/blender | |
parent | 1cb303242fa67574449315c59a786a7ad52ea957 (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/imbuf/intern/anim_movie.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |