diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 30373c7622..670680ea7c 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -285,6 +285,8 @@ int ff_combine_frame(ParseContext *pc, int next, return -1; } + av_assert0(next >= 0 || pc->buffer); + *buf_size = pc->overread_index = pc->index + next;