#200 closed defect (fixed)
aac - failure decoding audio stream when audio configuration changes
Reported by: | Glenn Callow | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
After testing early Freeview HD support with MythTV, on some recordings on audio would stop partway through the recording. This typically happens on program start/end and the following error is reported:
[aac_latm @ 0xf13bc0]channel element 0.0 is not allocated
Using a recorded file, both VLC and Mplayer exhibit the same problem, which indicates FFMpeg as the likely source. What appears to happen is there is a change in audio configuration in some of the streams from stereo to six speakers and back again. FFMpeg can decode both configurations fine, but fails if a transition occurs mid-stream.
I've posted a 50MB clip that exhibits the problem at:
http://www.mediafire.com/?5zx2x3zv2g6hxys
The audio decodes fine for the first three quarters of the clip, and then fails when the program starts.
Attachments (3)
Change History (8)
comment:1 by , 14 years ago
Component: | undetermined → avcodec |
---|---|
Reproduced by developer: | set |
Status: | new → open |
Summary: | aac_latm - failure decoding audio stream when audio configuration changes → aac - failure decoding audio stream when audio configuration changes |
Version: | unspecified → git-master |
by , 14 years ago
Attachment: | stereo51.aac added |
---|
by , 14 years ago
Attachment: | stereomono.aac added |
---|
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
comment:3 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The original sample still fails (parse_adts_frame_header is never called)
$ ffmpeg -i stereo51.loas out.ac3 ffmpeg version N-32813-g6d789f5, Copyright (c) 2000-2011 the FFmpeg developers built on Sep 23 2011 09:28:25 with gcc 4.5.3 configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc libavutil 51. 17. 0 / 51. 17. 0 libavcodec 53. 17. 0 / 53. 17. 0 libavformat 53. 13. 0 / 53. 13. 0 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 43. 3 / 2. 43. 3 libswscale 2. 1. 0 / 2. 1. 0 [loas @ 0x12b8780] max_analyze_duration 5000000 reached at 5013333 [loas @ 0x12b8780] Estimating duration from bitrate, this may be inaccurate Input #0, loas, from 'stereo51.loas': Duration: N/A, bitrate: N/A Stream #0.0: Audio: aac_latm, 48000 Hz, stereo, s16 Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt' Output #0, ac3, to 'out.ac3': Metadata: encoder : Lavf53.13.0 Stream #0.0: Audio: ac3, 48000 Hz, stereo, flt, 128 kb/s Stream mapping: Stream #0.0 -> #0.0 (aac_latm -> ac3) Press [q] to stop, [?] for help [aac_latm @ 0x12beb20] channel element 0.0 is not allocated Error while decoding stream #0.0 Error while decoding stream #0.0 ... Error while decoding stream #0.0 Error while decoding stream #0.0 Last message repeated 692 times size= 308kB time=00:00:19.68 bitrate= 128.0kbits/s video:0kB audio:308kB global headers:0kB muxing overhead 0.000000%
by , 13 years ago
Attachment: | stereo51.loas added |
---|
comment:5 by , 13 years ago
Sadly the fix for this issue caused some other files to decode corrupted.
See Issue574 for details.
I will attach two non-latm samples that show the problem:
out1.wav contains one second of stereo sound, mplayer -ac ffaac -sb 31500 stereomono.aac plays the remaining >3 seconds of mono.
out2.wav contains 7 seconds of stereo sound, mplayer -ac ffaac -channels 6 -sb 180000 stereo51.aac plays four (more) seconds of 5.1 sound.