mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffmpeg: Fix avframe memleak
Fixes CID1401674 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8779ec91b2
commit
004f27f0fb
4
ffmpeg.c
4
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;
|
||||
|
Loading…
Reference in New Issue
Block a user