mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
sink_buffer: guard against NULL frames.
This only happens if some filter somewhere is bogus, but it helps debugging.
This commit is contained in:
parent
e03ddbcd91
commit
72f3786d0f
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user