diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-05-06 09:14:01 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-05-14 23:36:10 +0400 |
commit | 8b05e13df3b25e186adaf19cf84f5fa93d829214 (patch) | |
tree | 6a4b9a7eb3402d88672898b142cf702f473da150 | |
parent | fad729fa505c0450482028c4a55c29fdc503dad7 (diff) |
buffersrc: fix invalid read in uninit if the fifo hasn't been allocated
-rw-r--r-- | libavfilter/buffersrc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 1ace368413..c7284c1ff8 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -137,7 +137,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); |