diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 11c41d6a0a..f3d07cd0ae 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -271,6 +271,7 @@ int ff_combine_frame(ParseContext *pc, int next, } pc->buffer = new_buffer; memcpy(&pc->buffer[pc->index], *buf, *buf_size); + memset(&pc->buffer[pc->index + *buf_size], 0, AV_INPUT_BUFFER_PADDING_SIZE); pc->index += *buf_size; return -1; }