} else {
scale += get_vlc2(gb, c->scale_diff.table, 9, 3) - 60;
}
- if (scale < 0 || scale > 128) {
+ if (scale < 0 || scale > 127) {
av_log(c->avctx, AV_LOG_ERROR, "Invalid scale value %d\n",
scale);
return AVERROR_INVALIDDATA;
av_log(avctx, AV_LOG_ERROR, "0x500 version should be mono\n");
return AVERROR_INVALIDDATA;
}
+ if (avctx->channels > 2) {
+ av_log(avctx, AV_LOG_ERROR, "Only 1 or 2 channels are supported.\n");
+ return AVERROR(EINVAL);
+ }
if (avctx->channels == 2)
av_log(avctx, AV_LOG_WARNING,
"Stereo mode support is not good, patch is welcome\n");