... | ... |
@@ -137,7 +137,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) |
137 | 137 |
static av_cold void uninit(AVFilterContext *ctx) |
138 | 138 |
{ |
139 | 139 |
BufferSourceContext *s = ctx->priv; |
140 |
- while (av_fifo_size(s->fifo)) { |
|
140 |
+ while (s->fifo && av_fifo_size(s->fifo)) { |
|
141 | 141 |
AVFilterBufferRef *buf; |
142 | 142 |
av_fifo_generic_read(s->fifo, &buf, sizeof(buf), NULL); |
143 | 143 |
avfilter_unref_buffer(buf); |