[FFmpeg-devel] MPADecodeContext on stack
Mon Jan 19 17:56:54 CET 2009
MPADecodeContext is allocated on the stack at two places:
sizeof(MPADecodeContext) = ~23k
This is, by far, the biggest stack consumer in ffmpeg.
(I recently bumped into a stack overflow on an embedded system)
Proposed patch fixes this by splitting out the required fields
for ff_mpegaudio_decode_header(), which is what is used at those places.
It's a bit intrusive to mpegaudiodec.c. Another option might be to copy
the fields back into MPADecodeContext, or malloc() MPADecodeContext
at those places instead.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 19950 bytes
Desc: not available
More information about the ffmpeg-devel