aacdec: correct "audio config changed" warning message
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jul 2012 22:20:21 +0000 (00:20 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jul 2012 22:26:27 +0000 (00:26 +0200)
Idea-by: Reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/aacdec.c

index 6d07bea..42fac7c 100644 (file)
@@ -2665,7 +2665,11 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
         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");
+        if(latmctx->initialized) {
+            av_log(avctx, AV_LOG_INFO, "audio config changed\n");
+        } else {
+            av_log(avctx, AV_LOG_INFO, "initializing latmctx\n");
+        }
         latmctx->initialized = 0;
 
         esize = (bits_consumed+7) / 8;