[Ffmpeg-devel] MAX_AUDIO_FRAME_SIZE and true-audio.com

Alex Beregszaszi alex
Sun Feb 12 02:03:01 CET 2006


I just finished my implementation of TTA/True Audio, a simple lossless
audio codec.

It looks like it was designed for archival and not direct playback, as
packets are _huge_ (50k-150k) and store a bit more than 1sec samples per
channel (that means 46040 for 44khz per channel). So a typical 44khz
stereo 16bit file has 180k audio output packets, while
MAX_AUDIO_FRAME_SIZE is 130k. This means the decoder is used to crash
with ffmpeg if I pass an above mentioned file.

However, ffplay hacks a bit more around this, as it allocates
MAX_AUDIO_FRAME_SIZE*3/2 bytes of buffer, so it works mostly.

Michael, what should be the solution? Should I truncate the output
packets and maintain an internal buffer? Or should we finally rework the
audio layer to a push model? Anyway, I will commit my decoder/demuxer
with these known bugs and let it fixed later.

Alex Beregszaszi 			email: alex at fsn.hu
Free Software Network			cell: +36 70 3144424

More information about the ffmpeg-devel mailing list