vf_fps: fix a memleak on malloc failure.
This commit is contained in:
parent
3825b52688
commit
d515e9c225
@ -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…
Reference in New Issue
Block a user