comparison gifdec.c @ 4729:8342af7feb90 libavcodec

pass correct buffer size to lzw decode init
author bcoudurier
date Sun, 25 Mar 2007 16:29:11 +0000
parents 7775ba23c931
children ccbe8d386410
comparison
equal deleted inserted replaced
4728:5db8e9e8f71d 4729:8342af7feb90
107 s->image_palette[s->transparent_color_index] = 0; 107 s->image_palette[s->transparent_color_index] = 0;
108 108
109 /* now get the image data */ 109 /* now get the image data */
110 code_size = bytestream_get_byte(&s->bytestream); 110 code_size = bytestream_get_byte(&s->bytestream);
111 //TODO: add proper data size 111 //TODO: add proper data size
112 ff_lzw_decode_init(s->lzw, code_size, s->bytestream, 0, FF_LZW_GIF); 112 ff_lzw_decode_init(s->lzw, code_size, s->bytestream,
113 s->bytestream_end - s->bytestream, FF_LZW_GIF);
113 114
114 /* read all the image */ 115 /* read all the image */
115 linesize = s->picture.linesize[0]; 116 linesize = s->picture.linesize[0];
116 ptr1 = s->picture.data[0] + top * linesize + left; 117 ptr1 = s->picture.data[0] + top * linesize + left;
117 ptr = ptr1; 118 ptr = ptr1;