Commit 797762fc authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/af_aecho: silence "maybe uninitialized warning"

if channels is 0 it actually would be uninitialized, thus an assert with comment is added
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0f48acf2
...@@ -190,7 +190,9 @@ static void echo_samples_## name ##p(AudioEchoContext *ctx, \ ...@@ -190,7 +190,9 @@ static void echo_samples_## name ##p(AudioEchoContext *ctx, \
const double in_gain = ctx->in_gain; \ const double in_gain = ctx->in_gain; \
const int nb_echoes = ctx->nb_echoes; \ const int nb_echoes = ctx->nb_echoes; \
const int max_samples = ctx->max_samples; \ const int max_samples = ctx->max_samples; \
int i, j, chan, index; \ int i, j, chan, av_uninit(index); \
\
av_assert1(channels > 0); /* would corrupt delay_index */ \
\ \
for (chan = 0; chan < channels; chan++) { \ for (chan = 0; chan < channels; chan++) { \
const type *s = (type *)src[chan]; \ const type *s = (type *)src[chan]; \
......
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