[FFmpeg-cvslog] avcodec/aacdec: Do not return a uninitialized value

Michael Niedermayer git at videolan.org
Mon Jun 8 02:42:18 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun  8 02:33:39 2015 +0200| [990605768c86eb3281c3a232df2d81ee5d3c6c41] | committer: Michael Niedermayer

avcodec/aacdec: Do not return a uninitialized value

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

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

 libavcodec/aacdec.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 2d12512..622cc5c 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2987,8 +2987,10 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
         if (avctx->debug & FF_DEBUG_STARTCODE)
             av_log(avctx, AV_LOG_DEBUG, "Elem type:%x id:%x\n", elem_type, elem_id);
 
-        if (!avctx->channels && elem_type != TYPE_PCE)
+        if (!avctx->channels && elem_type != TYPE_PCE) {
+            err = AVERROR_INVALIDDATA;
             goto fail;
+        }
 
         if (elem_type < TYPE_DSE) {
             if (!(che=get_che(ac, elem_type, elem_id))) {



More information about the ffmpeg-cvslog mailing list