[FFmpeg-devel] MPADecodeContext on stack
Vitor Sessak
vitor1001
Thu Jan 22 20:03:17 CET 2009
M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
>
>> On Mon, Jan 19, 2009 at 05:56:54PM +0100, Andreas ?man wrote:
>>> Hi
>>>
>>> MPADecodeContext is allocated on the stack at two places:
>>>
>>> libavformat/mp3.c
>>> libavcodec/mpegaudio_parser.c
>>>
>>> sizeof(MPADecodeContext) = ~23k
>>>
>>> This is, by far, the biggest stack consumer in ffmpeg.
>> i do not belive this entirely
>
> You believe correctly. Here's a list of stack offenders on ARM:
>
> 6553600 encode_frame nellymoserenc.c:339
> 262144 ff_mjpeg_decode_sos mjpegdec.c:886
> 105472 AC3_encode_frame ac3enc.c:1147
> 70656 roq_encode_frame roqvideoenc.c:998
This one can be trivially "fixed" by moving the data to the context, as
in the attached patch...
-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: roq_stack.diff
Type: text/x-diff
Size: 2735 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090122/6286f747/attachment.diff>
More information about the ffmpeg-devel
mailing list