This only happens if some filter somewhere is bogus, but it helps debugging.
Unified · Split
| @@ -23,6 +23,7 @@ · 22 unmodified lines | ||
| 23 | 23 | * buffer video sink |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | +#include "libavutil/avassert.h" | |
| 26 | 27 | #include "libavutil/fifo.h" |
| 27 | 28 | #include "avfilter.h" |
| 28 | 29 | #include "buffersink.h" |
| @@ -98,6 +99,7 @@ static void end_frame(AVFilterLink *inlink) · 69 unmodified lines | ||
| 98 | 99 | AVFilterContext *ctx = inlink->dst; |
| 99 | 100 | BufferSinkContext *buf = inlink->dst->priv; |
| 100 | 101 | |
| 102 | + av_assert1(inlink->cur_buf); | |
| 101 | 103 | if (av_fifo_space(buf->fifo) < sizeof(AVFilterBufferRef *)) { |
| 102 | 104 | /* realloc fifo size */ |
| 103 | 105 | if (av_fifo_realloc2(buf->fifo, av_fifo_size(buf->fifo) * 2) < 0) { |