Revision 26cdb9a2 libswscale/swscale-example.c

View differences:

libswscale/swscale-example.c
196 196
#define H 96
197 197

  
198 198
int main(int argc, char **argv){
199
	uint8_t rgb_data[W*H*4];
199
	uint8_t *rgb_data = malloc (W*H*4);
200 200
	uint8_t *rgb_src[3]= {rgb_data, NULL, NULL};
201 201
	int rgb_stride[3]={4*W, 0, 0};
202
	uint8_t data[3][W*H];
203
	uint8_t *src[3]= {data[0], data[1], data[2]};
202
	uint8_t *data = malloc (3*W*H);
203
	uint8_t *src[3]= {data, data+W*H, data+W*H*2};
204 204
	int stride[3]={W, W, W};
205 205
	int x, y;
206 206
	struct SwsContext *sws;

Also available in: Unified diff