Commit 5cd460ba authored by Michael Niedermayer's avatar Michael Niedermayer

vsrc_buffer: fix null ptr segfault

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0d115d77
...@@ -209,7 +209,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) ...@@ -209,7 +209,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
static av_cold void uninit(AVFilterContext *ctx) static av_cold void uninit(AVFilterContext *ctx)
{ {
BufferSourceContext *s = ctx->priv; BufferSourceContext *s = ctx->priv;
while (av_fifo_size(s->fifo)) { while (s->fifo && av_fifo_size(s->fifo)) {
AVFilterBufferRef *buf; AVFilterBufferRef *buf;
av_fifo_generic_read(s->fifo, &buf, sizeof(buf), NULL); av_fifo_generic_read(s->fifo, &buf, sizeof(buf), NULL);
avfilter_unref_buffer(buf); avfilter_unref_buffer(buf);
......
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