ffmpeg: Fix avframe memleak

Fixes CID1401674

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/258/head
Michael Niedermayer 8 years ago
parent 8779ec91b2
commit 004f27f0fb
  1. 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…
Cancel
Save