[FFmpeg-devel] MPADecodeContext on stack
Thu Jan 22 01:11:48 CET 2009
On Mon, Jan 19, 2009 at 05:56:54PM +0100, Andreas ?man wrote:
> MPADecodeContext is allocated on the stack at two places:
> sizeof(MPADecodeContext) = ~23k
> This is, by far, the biggest stack consumer in ffmpeg.
i do not belive this entirely
> (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.
i think this could be done simpler similarly to how Picture/AVFrame is done
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel