Skip to content
Snippets Groups Projects
Commit 31bc6b45 authored by Justin Ruggles's avatar Justin Ruggles
Browse files

prevent crash when dba params are invalid

Originally committed as revision 13653 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent d326dd97
No related branches found
No related tags found
No related merge requests found
......@@ -157,8 +157,8 @@ void ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,
if (dba_mode == DBA_REUSE || dba_mode == DBA_NEW) {
int band, seg, delta;
band = 0;
for (seg = 0; seg < dba_nsegs; seg++) {
band += dba_offsets[seg];
for (seg = 0; seg < FFMIN(8, dba_nsegs); seg++) {
band = FFMIN(49, band + dba_offsets[seg]);
if (dba_values[seg] >= 4) {
delta = (dba_values[seg] - 3) << 7;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment