Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-04-24 14:51:37 +0400
committerNicolas George <nicolas.george@normalesup.org>2012-05-31 19:27:27 +0400
commit72f3786d0f0897ed0fc3356f4fec167219de54a4 (patch)
tree24e5fa6fc45f4fe277990633549e965fb45e2eb3 /libavfilter
parente03ddbcd919b11a289c2de8a47c83efe7fab32fb (diff)
sink_buffer: guard against NULL frames.
This only happens if some filter somewhere is bogus, but it helps debugging.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/sink_buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c
index 3eb66ca7d5..d83f21ba61 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) {