diff options
author | Marc Hoffman <mmh@pleasantst.com> | 2007-04-26 11:05:59 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2007-04-26 11:05:59 +0000 |
commit | 26cdb9a2aa7f7ca7ad76aa502f0b74ef41d8ff87 (patch) | |
tree | 7030de0e1de142ffdc7d88e1b5547bfa23828503 /libswscale | |
parent | 578688fad5391a1bda79c99fde998a20ca7f0070 (diff) | |
download | ffmpeg-streaming-26cdb9a2aa7f7ca7ad76aa502f0b74ef41d8ff87.zip ffmpeg-streaming-26cdb9a2aa7f7ca7ad76aa502f0b74ef41d8ff87.tar.gz |
Remove large automatics from stack.
patch by Marc Hoffman, mmh pleasantst com
Originally committed as revision 23117 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale-example.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c index 40f04c7..1c71ba7 100644 --- a/libswscale/swscale-example.c +++ b/libswscale/swscale-example.c @@ -196,11 +196,11 @@ static void selfTest(uint8_t *src[3], int stride[3], int w, int h){ #define H 96 int main(int argc, char **argv){ - uint8_t rgb_data[W*H*4]; + uint8_t *rgb_data = malloc (W*H*4); uint8_t *rgb_src[3]= {rgb_data, NULL, NULL}; int rgb_stride[3]={4*W, 0, 0}; - uint8_t data[3][W*H]; - uint8_t *src[3]= {data[0], data[1], data[2]}; + uint8_t *data = malloc (3*W*H); + uint8_t *src[3]= {data, data+W*H, data+W*H*2}; int stride[3]={W, W, W}; int x, y; struct SwsContext *sws; |