Commit 1426291e authored by Michael Niedermayer's avatar Michael Niedermayer

sonicdec: check decorrelation

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8251c053
...@@ -801,6 +801,10 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx) ...@@ -801,6 +801,10 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx)
if (!s->lossless) if (!s->lossless)
skip_bits(&gb, 3); // XXX FIXME skip_bits(&gb, 3); // XXX FIXME
s->decorrelation = get_bits(&gb, 2); s->decorrelation = get_bits(&gb, 2);
if (s->decorrelation != 3 && s->channels != 2) {
av_log(avctx, AV_LOG_ERROR, "invalid decorrelation %d\n", s->decorrelation);
return AVERROR_INVALIDDATA;
}
s->downsampling = get_bits(&gb, 2); s->downsampling = get_bits(&gb, 2);
if (!s->downsampling) { if (!s->downsampling) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment