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.
This commit is contained in:
Sebastian Parborg 2022-03-07 19:02:34 +01:00
parent 1cb303242f
commit 0597902bde
1 changed files with 2 additions and 0 deletions

View File

@ -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;