aacdec: consistently use avctx for logging in decode_eld_specific_config
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 16 Apr 2015 14:58:32 +0000 (16:58 +0200)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Sun, 19 Apr 2015 22:45:35 +0000 (23:45 +0100)
ac may be NULL and then accessing ac->avctx results in a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/aacdec.c

index ebeda9b..7b306c9 100644 (file)
@@ -819,7 +819,7 @@ static int decode_eld_specific_config(AACContext *ac, AVCodecContext *avctx,
         if (len == 15 + 255)
             len += get_bits(gb, 16);
         if (get_bits_left(gb) < len * 8 + 4) {
-            av_log(ac->avctx, AV_LOG_ERROR, overread_err);
+            av_log(avctx, AV_LOG_ERROR, overread_err);
             return AVERROR_INVALIDDATA;
         }
         skip_bits_long(gb, 8 * len);