From 5cd460ba63fa78aa8c61e7e5c43da194b0505717 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 17 Apr 2012 03:19:57 +0200 Subject: [PATCH] vsrc_buffer: fix null ptr segfault Signed-off-by: Michael Niedermayer --- libavfilter/vsrc_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c index d003add88b..ba00b2b651 100644 --- a/libavfilter/vsrc_buffer.c +++ b/libavfilter/vsrc_buffer.c @@ -209,7 +209,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) static av_cold void uninit(AVFilterContext *ctx) { BufferSourceContext *s = ctx->priv; - while (av_fifo_size(s->fifo)) { + while (s->fifo && av_fifo_size(s->fifo)) { AVFilterBufferRef *buf; av_fifo_generic_read(s->fifo, &buf, sizeof(buf), NULL); avfilter_unref_buffer(buf);