[FFmpeg-devel] AAC decoder corrups memory?

Pavel Pavlov pavel
Wed Mar 17 20:50:29 CET 2010


> >>> ?On 17 March 2010 10:35, Pavel Pavlov<pavel at summit-tech.ca> ?wrote:
> >>> ?> ?I didn't try to play clips with aac sound for a while and
> wanted to
> >>> ?try some clips from IPone (that contain aac sound) and I'm
> constantly
> >>> ?getting crashes. These crashes happen because of memory corruption
> and
> >>> ?malloc returns 0 (I see debug messages about heap corruption). All
> that
> >>> ?happens before even it starts to play anything, sometimes even
> before
> >>> ?av_find_stream_info returns. I tried to debug, and I see that
> >>> ?av_find_stream_info internally opens aac decoder. I tried to play
> >>> ?different files, no problem, but If I play files with aac it
> always
> >>> ?crashes. I disable aac decoder and recompiled ffmpeg and now it
> doesn't
> >>> ?crash.
> >>> ?> ?Simply dropping a file with aac sound to ffplay crashes it
> before it
> >>> ?even starts playing. Anyone has the same behavior? Seems that it
> was
> >>> ?affected by some recent changes, the same movies that I'm trying
> to
> >>> ?play used to play fine before
> >>>
> >>> ?http://ffmpeg.org/bugreports.html
> >>>
> >>> ?And please provide a sample with which you can reproduce the
> issue.
> >>>
> >>
> >>
> >> Considering that it fails before even trying to read packets I guess
> >> anything that contains aac will have the same effect.
> 
> Instead of guesses, please provide a sample large enough to trigger
> this and valgrind/gdb traces alongwith a proper bug report on the
> issue tracker. Thanks.
> 



I tried 4 random samples from http://samples.mplayerhq.hu/A-codecs/AAC/, and all of them fail with ffplay before even playing anything.
These are the ones I tried:
http://samples.mplayerhq.hu/A-codecs/AAC/2_aac_error_while_decoding_stream.aac  (cool music here :)
http://samples.mplayerhq.hu/A-codecs/AAC/Bandit.mp4
http://samples.mplayerhq.hu/A-codecs/AAC/ct_faac-adts.aac
http://samples.mplayerhq.hu/A-codecs/AAC/freetv_aac_latm.ts

I don't use gnu tools, so I don't have and cannot send gdb backtrace. I tried to debug with VS, but it's the first time I see something like that - it doesn't show any stacktrace at all. If run from within debugger itself, then I see messages about heap corruption and then it asserts in my code after malloc returns 0. There is nothing wrong in the backtrace and nothing that relates to crash, I'm getting malloc 0 from different places all the time, but the initial source of that malloc failure is because heap was corrupted somewhere by acc decoder code. Im building with intel compiler on windows by the way, if it matters. Just try one of the samples with you build of ffplay and see if it plays anything.



More information about the ffmpeg-devel mailing list