Browse Source

buffersrc: fix invalid read in uninit if the fifo hasn't been allocated

tags/n0.11
Anton Khirnov 13 years ago
parent
commit
8b05e13df3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavfilter/buffersrc.c

+ 1
- 1
libavfilter/buffersrc.c View File

@@ -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);


Loading…
Cancel
Save