Commit 8cd8c833 authored by James Almer's avatar James Almer

avcodec/aacenc_ltp: fix use of uninitialized values

Fixes some valgrind warnings.
Reviewed-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent b905ba5b
...@@ -74,8 +74,8 @@ void ff_aac_ltp_insert_new_frame(AACEncContext *s) ...@@ -74,8 +74,8 @@ void ff_aac_ltp_insert_new_frame(AACEncContext *s)
static void get_lag(float *buf, const float *new, LongTermPrediction *ltp) static void get_lag(float *buf, const float *new, LongTermPrediction *ltp)
{ {
int i, j, lag, max_corr = 0; int i, j, lag = 0, max_corr = 0;
float max_ratio; float max_ratio = 0.0f;
for (i = 0; i < 2048; i++) { for (i = 0; i < 2048; i++) {
float corr, s0 = 0.0f, s1 = 0.0f; float corr, s0 = 0.0f, s1 = 0.0f;
const int start = FFMAX(0, i - 1024); const int start = FFMAX(0, i - 1024);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment