}
for (k = 2; k < opt_order; k++)
- quant_cof[k] = (quant_cof[k] * (1 << 14)) + (add_base << 13);
+ quant_cof[k] = (quant_cof[k] * (1U << 14)) + (add_base << 13);
}
}
ALSSpecificConfig *sconf = &ctx->sconf;
*bd->shift_lsbs = 0;
+
+ if (get_bits_left(gb) < 1)
+ return AVERROR_INVALIDDATA;
+
// read block type flag and read the samples accordingly
if (get_bits1(gb)) {
ret = read_var_block_data(ctx, bd);
.close = decode_end,
.decode = decode_frame,
.flush = flush,
- .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
+ .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};