[FFmpeg-devel] [PATCH 1/3] sink_buffer: guard against NULL frames.
Nicolas George
nicolas.george at normalesup.org
Sun May 20 21:26:13 CEST 2012
This only happens if some filter somewhere is bogus,
but it helps debugging.
Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
libavfilter/sink_buffer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c
index 3eb66ca..d83f21b 100644
--- a/libavfilter/sink_buffer.c
+++ b/libavfilter/sink_buffer.c
@@ -23,6 +23,7 @@
* buffer video sink
*/
+#include "libavutil/avassert.h"
#include "libavutil/fifo.h"
#include "avfilter.h"
#include "buffersink.h"
@@ -98,6 +99,7 @@ static void end_frame(AVFilterLink *inlink)
AVFilterContext *ctx = inlink->dst;
BufferSinkContext *buf = inlink->dst->priv;
+ av_assert1(inlink->cur_buf);
if (av_fifo_space(buf->fifo) < sizeof(AVFilterBufferRef *)) {
/* realloc fifo size */
if (av_fifo_realloc2(buf->fifo, av_fifo_size(buf->fifo) * 2) < 0) {
--
1.7.10
More information about the ffmpeg-devel
mailing list