[FFmpeg-devel] [PATCH] lame buffer shortage

Gabriel Bouvigne bouvigne
Sun Jul 22 14:17:29 CEST 2007


Michael Niedermayer a ?crit :
> lame is VERY broken, if it where not it would never need more then
> the size of the largest possible packet ...

Patches are welcome ;-)

Actually, if you were only allocating (2*MPA_FRAME_SIZE), then Lame will 
obviously fail in many cases.
Your buffer size is fine for a Layer II encoder, or an Layer III encoder 
that would not use bit reservoir.
However, when using the bit reservoir feature, you often need to encode 
several further frames before beeing able to do the actual bistream 
writing. In this case, you often encounter some cases where the encoder 
is outputing more than 1 frame once it's able to do proper bistream 
formatting.

Regarding the patch itself, why not simply allocating the buffer size 
recommended into lame.h ?

Regards,

-- 
Gabriel Bouvigne
www.mp3-tech.org
personal page: http://gabriel.mp3-tech.org




More information about the ffmpeg-devel mailing list