mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
dca: dont overread dca_default_coeffs.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
51db9a97e9
commit
d7bce4a274
@ -801,10 +801,14 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int am = s->amode & DCA_CHANNEL_MASK;
|
int am = s->amode & DCA_CHANNEL_MASK;
|
||||||
|
if (am < 16) {
|
||||||
for (j = base_channel; j < s->prim_channels; j++) {
|
for (j = base_channel; j < s->prim_channels; j++) {
|
||||||
s->downmix_coef[j][0] = dca_default_coeffs[am][j][0];
|
s->downmix_coef[j][0] = dca_default_coeffs[am][j][0];
|
||||||
s->downmix_coef[j][1] = dca_default_coeffs[am][j][1];
|
s->downmix_coef[j][1] = dca_default_coeffs[am][j][1];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
av_log(s->avctx, AV_LOG_WARNING, "amode > 15 default downmix_coef unsupported\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user