[FFmpeg-cvslog] latm: fix initialization on some streams when no extradata is available

Hendrik Leppkes git at videolan.org
Sun Jul 8 00:27:12 CEST 2012


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Fri Dec 23 00:14:32 2011 +0100| [d039b6074ca68da9b6dc88d8bb40056fee9fecb6] | committer: Michael Niedermayer

latm: fix initialization on some streams when no extradata is available

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

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

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

diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 1b9a203..6d07bea 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -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");



More information about the ffmpeg-cvslog mailing list