You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
vf_fps: fix a memleak on malloc failure.
This commit is contained in:
@@ -161,8 +161,10 @@ static int write_to_fifo(AVFifoBuffer *fifo, AVFilterBufferRef *buf)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!av_fifo_space(fifo) &&
|
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;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
av_fifo_generic_write(fifo, &buf, sizeof(buf), NULL);
|
av_fifo_generic_write(fifo, &buf, sizeof(buf), NULL);
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user