[FFmpeg-cvslog] swr: fix "may be used uninitialized in this function" warnings

Michael Niedermayer git at videolan.org
Sun Jan 20 17:19:40 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 20 17:09:48 2013 +0100| [cc4a41727e29a52a181e3d1c1a398f1da40969c3] | committer: Michael Niedermayer

swr: fix "may be used uninitialized in this function" warnings

The uninitialized use implicates 0 channels, which is unlikely
to reach this function but fixed anyway in this commit.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cc4a41727e29a52a181e3d1c1a398f1da40969c3
---

 libswresample/dither_template.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libswresample/dither_template.c b/libswresample/dither_template.c
index ecbe55c..4af7312 100644
--- a/libswresample/dither_template.c
+++ b/libswresample/dither_template.c
@@ -24,7 +24,8 @@ ERROR
 #endif
 
 void RENAME(swri_noise_shaping)(SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count){
-    int i, j, pos, ch;
+    int pos = s->dither.ns_pos;
+    int i, j, ch;
     int taps  = s->dither.ns_taps;
     float S   = s->dither.ns_scale;
     float S_1 = s->dither.ns_scale_1;



More information about the ffmpeg-cvslog mailing list