[MPlayer-dev-eng] [Suggested PATCH] Increase maximum ftp file path length
Sergey
sergemp at mail.ru
Mon Nov 5 09:18:47 CET 2012
On Mon, 5 Nov 2012 13:19:19 Xidorn Quan wrote:
>> - char rsp_txt[256];
>> + char rsp_txt[65536];
>> - char str[256],rsp_txt[256];
>> + char str[65536],rsp_txt[65536];
> I don't think it's a good idea to put such a large array in stack.
Well, it's just I hit 100 characters limitation for UTF8 many times
on real URLs, so I tried to increase it to something that "must
definitely be enough". Default stack size is about 10 megabytes, and
I guess all those functions are leafs, they're neither recursive, nor
long-lived, thus won't take stack from other parts of mplayer.
Anyway. What should I do? Should I decrease the size and resuggest
patch? What is the maximum allowed size then? Is 16384 good?
Or should I mark all these variables "static" instead?
PS: just looked around:
libavformat/rtsp.c: char buf[16384], *q;
libavformat/rtmpproto.c: uint8_t tmp_buf[16384];
libavcodec/vorbisenc.c: uint8_t buffer[50000] = {0}, *p = buffer;
libmpdemux/demux_audio.c: unsigned char buf[16384]; // vlc uses 16384*4 (4 dts frames)
libmpdemux/demux_ts.c: struct {...} pes_priv1[8192], *pptr;
--
Sergey
More information about the MPlayer-dev-eng
mailing list