Commit 72f3786d authored by Nicolas George's avatar Nicolas George

sink_buffer: guard against NULL frames.

This only happens if some filter somewhere is bogus,
but it helps debugging.
parent e03ddbcd
......@@ -23,6 +23,7 @@
* buffer video sink
*/
#include "libavutil/avassert.h"
#include "libavutil/fifo.h"
#include "avfilter.h"
#include "buffersink.h"
......@@ -98,6 +99,7 @@ static void end_frame(AVFilterLink *inlink)
AVFilterContext *ctx = inlink->dst;
BufferSinkContext *buf = inlink->dst->priv;
av_assert1(inlink->cur_buf);
if (av_fifo_space(buf->fifo) < sizeof(AVFilterBufferRef *)) {
/* realloc fifo size */
if (av_fifo_realloc2(buf->fifo, av_fifo_size(buf->fifo) * 2) < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment