mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-26 13:00:33 +00:00
dca: Respect the current limits in the downmixing capabilities
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
parent
f261e50845
commit
3802833bc1
@ -807,6 +807,12 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
|
||||
"Invalid channel mode %d\n", am);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (s->prim_channels > FF_ARRAY_ELEMS(dca_default_coeffs[0])) {
|
||||
avpriv_request_sample(s->avctx, "Downmixing %d channels",
|
||||
s->prim_channels);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
for (j = base_channel; j < s->prim_channels; j++) {
|
||||
s->downmix_coef[j][0] = dca_default_coeffs[am][j][0];
|
||||
s->downmix_coef[j][1] = dca_default_coeffs[am][j][1];
|
||||
|
Loading…
Reference in New Issue
Block a user