[FFmpeg-cvslog] ac3enc: fix 'warning: block0 may be used uninitialized in this function'

Michael Niedermayer git at videolan.org
Tue Jan 29 16:20:05 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jan 29 16:15:02 2013 +0100| [ebe368d5d82c368fec81ec4ddf216200e5008999] | committer: Michael Niedermayer

ac3enc: fix 'warning: block0 may be used uninitialized in this function'

The pointer is also initialized to NULL for safety.

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

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

 libavcodec/ac3enc_template.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index 904e0bb..b1174dc 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -336,7 +336,7 @@ static void compute_rematrixing_strategy(AC3EncodeContext *s)
 {
     int nb_coefs;
     int blk, bnd;
-    AC3Block *block, *block0;
+    AC3Block *block, *block0 = NULL;
 
     if (s->channel_mode != AC3_CHMODE_STEREO)
         return;



More information about the ffmpeg-cvslog mailing list