Yuriy M. Kaminskiy <yum...@mail.ru> added the comment:

aac-6ch-chan-elt-not-allocated.mka was slightly different issue (and already
fixed as of r24028 - "Duplicate channel tag found, attempting to remap")
aac-2ch-* still unfixed (btw, I noticed few more files where switch
CPE1.0->CPE1.2 happens in middle of file, not at beginning; this is not only
such file in the wild).
New patch attached (not extensively tested, but seems works).

----------
nosy: +yukam

________________________________________________
FFmpeg issue tracker <iss...@roundup.ffmpeg.org>
<https://roundup.ffmpeg.org/issue1733>
________________________________________________
Index: MPlayer-20100703+lavc-mt/libavcodec/aacdec.c
===================================================================
--- MPlayer-20100703+lavc-mt.orig/libavcodec/aacdec.c	2010-07-04 01:09:57.000000000 +0400
+++ MPlayer-20100703+lavc-mt/libavcodec/aacdec.c	2010-07-04 23:00:24.000000000 +0400
@@ -132,8 +132,12 @@ static ChannelElement *get_che(AACContex
     if (ac->tag_che_map[type][elem_id]) {
         return ac->tag_che_map[type][elem_id];
     }
+    av_log(ac->avctx, AV_LOG_DEBUG, "%d.%d chan_config=%d mapped=%d\n",
+           type, elem_id, (int)ac->m4ac.chan_config, (int)ac->tags_mapped);
     if (ac->tags_mapped >= tags_per_config[ac->m4ac.chan_config]) {
-        return NULL;
+        av_log(ac->avctx, AV_LOG_WARNING, "reset tags_mapped (%d>=%d)\n",
+               ac->tags_mapped, tags_per_config[ac->m4ac.chan_config]);
+        ac->tags_mapped = 0;
     }
     switch (ac->m4ac.chan_config) {
     case 7:

Reply via email to