mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-21 14:53:10 +00:00
ac3dec: simplify exponent bounds checking
Originally committed as revision 16022 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
97679e6e38
commit
2ceccf045c
@ -392,7 +392,7 @@ static int decode_exponents(GetBitContext *gbc, int exp_strategy, int ngrps,
|
|||||||
prevexp = absexp;
|
prevexp = absexp;
|
||||||
for(i=0,j=0; i<ngrps*3; i++) {
|
for(i=0,j=0; i<ngrps*3; i++) {
|
||||||
prevexp += dexp[i] - 2;
|
prevexp += dexp[i] - 2;
|
||||||
if (prevexp < 0 || prevexp > 24)
|
if (prevexp > 24U)
|
||||||
return -1;
|
return -1;
|
||||||
switch (group_size) {
|
switch (group_size) {
|
||||||
case 4: dexps[j++] = prevexp;
|
case 4: dexps[j++] = prevexp;
|
||||||
|
Loading…
Reference in New Issue
Block a user