diff --git a/libavcodec/leaddec.c b/libavcodec/leaddec.c index f7d31681b8..a6f6c3cc87 100644 --- a/libavcodec/leaddec.c +++ b/libavcodec/leaddec.c @@ -196,7 +196,9 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame, i++; } - init_get_bits8(&gb, s->bitstream_buf, size); + ret = init_get_bits8(&gb, s->bitstream_buf, size); + if (ret < 0) + return ret; if (avctx->pix_fmt == AV_PIX_FMT_YUV420P && zero) { for (int mb_y = 0; mb_y < avctx->height / 8; mb_y++)