vf_fps: fix a memleak on malloc failure.

pull/28/head
Anton Khirnov 13 years ago
parent 3825b52688
commit d515e9c225
  1. 4
      libavfilter/vf_fps.c

@ -161,8 +161,10 @@ static int write_to_fifo(AVFifoBuffer *fifo, AVFilterBufferRef *buf)
int ret;
if (!av_fifo_space(fifo) &&
(ret = av_fifo_realloc2(fifo, 2*av_fifo_size(fifo))))
(ret = av_fifo_realloc2(fifo, 2*av_fifo_size(fifo)))) {
avfilter_unref_bufferp(&buf);
return ret;
}
av_fifo_generic_write(fifo, &buf, sizeof(buf), NULL);
return 0;

Loading…
Cancel
Save