}
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);
}
-AVCodec ff_als_decoder = {
+const AVCodec ff_als_decoder = {
.name = "als",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
.type = AVMEDIA_TYPE_AUDIO,
.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,
};