diff options
author | Martijn van Beurden <mvanb1@gmail.com> | 2014-11-16 15:09:54 +0100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-11-16 09:11:02 -0800 |
commit | d8d171705a5d8e3ff9c24f1ff9edd17dd68939a7 (patch) | |
tree | 4f5e95dbd6990a9f19d4f6a8bf187a60bc12d890 | |
parent | 9971e7057d91e0dde8e94e0ae565837cf1891c70 (diff) | |
download | flac-d8d171705a5d8e3ff9c24f1ff9edd17dd68939a7.tar.gz |
libFLAC: fix more problems with new window functions
This fixes two problems with handling of out-of-bounds arguments
for the window functions, one of which involving an infinite loop
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
-rw-r--r-- | src/libFLAC/window.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libFLAC/window.c b/src/libFLAC/window.c index 42772e8e..947a7d38 100644 --- a/src/libFLAC/window.c +++ b/src/libFLAC/window.c @@ -215,9 +215,9 @@ void FLAC__window_partial_tukey(FLAC__real *window, const FLAC__int32 L, const F FLAC__int32 Np, n, i; if (p <= 0.0f) - FLAC__window_partial_tukey(window, L, 0.01f, start, end); + FLAC__window_partial_tukey(window, L, 0.05f, start, end); else if (p >= 1.0f) - FLAC__window_partial_tukey(window, L, 1.0f, start, end); + FLAC__window_partial_tukey(window, L, 0.95f, start, end); else { Np = (FLAC__int32)(p / 2.0f * N); @@ -242,9 +242,9 @@ void FLAC__window_punchout_tukey(FLAC__real *window, const FLAC__int32 L, const FLAC__int32 Ns, Ne, n, i; if (p <= 0.0f) - FLAC__window_partial_tukey(window, L, 0.01f, start, end); + FLAC__window_punchout_tukey(window, L, 0.05f, start, end); else if (p >= 1.0f) - FLAC__window_partial_tukey(window, L, 1.0f, start, end); + FLAC__window_punchout_tukey(window, L, 0.95f, start, end); else { Ns = (FLAC__int32)(p / 2.0f * start_n); |