mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
sonicdec: check decorrelation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8251c05320
commit
1426291eb8
@ -801,6 +801,10 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx)
|
||||
if (!s->lossless)
|
||||
skip_bits(&gb, 3); // XXX FIXME
|
||||
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);
|
||||
if (!s->downsampling) {
|
||||
|
Loading…
Reference in New Issue
Block a user