[FFmpeg-cvslog] ffmpeg: Fix avframe memleak
Michael Niedermayer
git at videolan.org
Thu Mar 30 17:40:13 EEST 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Mar 30 16:13:22 2017 +0200| [004f27f0fb6e8ebf6b4078c77d21b0f248a2213f] | committer: Michael Niedermayer
ffmpeg: Fix avframe memleak
Fixes CID1401674
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=004f27f0fb6e8ebf6b4078c77d21b0f248a2213f
---
ffmpeg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 1a0e909..11faf0d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2176,8 +2176,10 @@ static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame)
if (!av_fifo_space(ifilter->frame_queue)) {
ret = av_fifo_realloc2(ifilter->frame_queue, 2 * av_fifo_size(ifilter->frame_queue));
- if (ret < 0)
+ if (ret < 0) {
+ av_frame_free(&tmp);
return ret;
+ }
}
av_fifo_generic_write(ifilter->frame_queue, &tmp, sizeof(tmp), NULL);
return 0;
More information about the ffmpeg-cvslog
mailing list