diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-04-24 12:51:37 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-05-31 17:27:27 +0200 |
commit | 72f3786d0f0897ed0fc3356f4fec167219de54a4 (patch) | |
tree | 24e5fa6fc45f4fe277990633549e965fb45e2eb3 /libavfilter/sink_buffer.c | |
parent | e03ddbcd919b11a289c2de8a47c83efe7fab32fb (diff) | |
download | ffmpeg-streaming-72f3786d0f0897ed0fc3356f4fec167219de54a4.zip ffmpeg-streaming-72f3786d0f0897ed0fc3356f4fec167219de54a4.tar.gz |
sink_buffer: guard against NULL frames.
This only happens if some filter somewhere is bogus,
but it helps debugging.
Diffstat (limited to 'libavfilter/sink_buffer.c')
-rw-r--r-- | libavfilter/sink_buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c index 3eb66ca..d83f21b 100644 --- a/libavfilter/sink_buffer.c +++ b/libavfilter/sink_buffer.c @@ -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) { |