[FFmpeg-devel] [PATCH] Do not use an uninitialized variable in libfaad.c

Carl Eugen Hoyos cehoyos
Thu May 8 18:26:19 CEST 2008


Hi!

If faacDecInit fails, frame_info was never initialized, so it should not be 
used.
Patch attached (fixes another icc warning).

Carl Eugen
-------------- next part --------------
Index: libavcodec/libfaad.c
===================================================================
--- libavcodec/libfaad.c	(revision 13078)
+++ libavcodec/libfaad.c	(working copy)
@@ -180,8 +180,7 @@
         unsigned char channels;
         int r = s->faacDecInit(s->faac_handle, buf, buf_size, &srate, &channels);
         if(r < 0){
-            av_log(avctx, AV_LOG_ERROR, "faac: codec init failed: %s\n",
-                   s->faacDecGetErrorMessage(frame_info.error));
+            av_log(avctx, AV_LOG_ERROR, "faac: codec init failed.\n");
             return -1;
         }
         avctx->sample_rate = srate;



More information about the ffmpeg-devel mailing list