diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-07 03:07:34 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-07 03:48:07 +0200 |
commit | 797762fcf3c5fd8afb84bf89095c79521597913a (patch) | |
tree | c0161aec078e1d004d8fb8d8a7430691c92b9d31 /libavfilter | |
parent | 0f48acf29bab33a550fd8a8a4781f2b908efa8ca (diff) | |
download | ffmpeg-797762fcf3c5fd8afb84bf89095c79521597913a.tar.gz |
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_aecho.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/af_aecho.c b/libavfilter/af_aecho.c index e73252b4a0..6795baa2d8 100644 --- a/libavfilter/af_aecho.c +++ b/libavfilter/af_aecho.c @@ -190,7 +190,9 @@ static void echo_samples_## name ##p(AudioEchoContext *ctx, \ const double in_gain = ctx->in_gain; \ const int nb_echoes = ctx->nb_echoes; \ 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++) { \ const type *s = (type *)src[chan]; \ |