latm: fix initialization on some streams when no extradata is available
authorHendrik Leppkes <h.leppkes@gmail.com>
Thu, 22 Dec 2011 23:14:32 +0000 (00:14 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jul 2012 22:26:26 +0000 (00:26 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/aacdec.c

index 1b9a203..6d07bea 100644 (file)
@@ -2661,7 +2661,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
     if (bits_consumed < 0)
         return AVERROR_INVALIDDATA;
 
-    if (ac->oc[1].m4ac.sample_rate != m4ac.sample_rate ||
+    if (!latmctx->initialized ||
+        ac->oc[1].m4ac.sample_rate != m4ac.sample_rate ||
         ac->oc[1].m4ac.chan_config != m4ac.chan_config) {
 
         av_log(avctx, AV_LOG_INFO, "audio config changed\n");