diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 76df971aaa..2e4a74f46f 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -966,6 +966,8 @@ static int imc_decode_frame(AVCodecContext *avctx, AVFrame *frame, LOCAL_ALIGNED_16(uint16_t, buf16, [(IMC_BLOCK_SIZE + AV_INPUT_BUFFER_PADDING_SIZE) / 2]); + memset(buf16 + IMC_BLOCK_SIZE/2, 0, AV_INPUT_BUFFER_PADDING_SIZE); + q->avctx = avctx; if (buf_size < IMC_BLOCK_SIZE * avctx->ch_layout.nb_channels) {