1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Original Commit: r69 | ods15 | 2006-09-27 20:27:50 +0300 (Wed, 27 Sep 2006) | 2 lines

prevent buffer overflow

Originally committed as revision 6474 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Oded Shimon 2006-10-02 06:08:07 +00:00
parent 65c7236929
commit 90a09b69d7

View File

@ -661,7 +661,7 @@ static void floor_fit(venc_context_t * venc, floor_t * fc, float * coeffs, int *
for (j = begin; j < end; j++) average += fabs(coeffs[j]);
average /= end - begin;
average /= 32; // MAGIC!
for (j = 0; j < range; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break;
for (j = 0; j < range - 1; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break;
posts[fc->list[i].sort] = j;
}
}