Browse Source

avcodec/sinewin_tablegen: Use better check in assert

There are no ff_sine_windows for 2^i, 0 <= i < 5, so one should check
for the index being >= 5.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
tags/n4.4
Andreas Rheinhardt 4 years ago
parent
commit
7688f94e90
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/sinewin_tablegen.h

+ 1
- 1
libavcodec/sinewin_tablegen.h View File

@@ -74,7 +74,7 @@ av_cold void AAC_RENAME(ff_sine_window_init)(INTFLOAT *window, int n) {
} }


av_cold void AAC_RENAME(ff_init_ff_sine_windows)(int index) { av_cold void AAC_RENAME(ff_init_ff_sine_windows)(int index) {
assert(index >= 0 && index < FF_ARRAY_ELEMS(AAC_RENAME(ff_sine_windows)));
assert(index >= 5 && index < FF_ARRAY_ELEMS(AAC_RENAME(ff_sine_windows)));
#if !CONFIG_HARDCODED_TABLES #if !CONFIG_HARDCODED_TABLES
AAC_RENAME(ff_sine_window_init)(AAC_RENAME(ff_sine_windows)[index], 1 << index); AAC_RENAME(ff_sine_window_init)(AAC_RENAME(ff_sine_windows)[index], 1 << index);
#endif #endif


Loading…
Cancel
Save