diff --git a/libavcodec/apac.c b/libavcodec/apac.c index 6a1f61b842..e9f6a0dd88 100644 --- a/libavcodec/apac.c +++ b/libavcodec/apac.c @@ -191,6 +191,8 @@ static int apac_decode(AVCodecContext *avctx, AVFrame *frame, if (c->bit_length < 0 || c->bit_length > 17) { c->bit_length = avctx->bits_per_coded_sample; + s->bitstream_index = 0; + s->bitstream_size = 0; return AVERROR_INVALIDDATA; }