# HG changeset patch # User jai_menon # Date 1243357145 0 # Node ID 5df11d49abb78970d202b5ca97e1368a46cd99de # Parent d762f9979193155af43d555b45ae9d49b936c51e Use dimensions stored in AVCodecContext instead of local variables. diff -r d762f9979193 -r 5df11d49abb7 libopenjpeg.c --- a/libopenjpeg.c Tue May 26 05:00:51 2009 +0000 +++ b/libopenjpeg.c Tue May 26 16:59:05 2009 +0000 @@ -144,10 +144,10 @@ adjust[x] = FFMAX(image->comps[x].prec - 8, 0); } - for(y = 0; y < height; y++) { - index = y*width; + for(y = 0; y < avctx->height; y++) { + index = y*avctx->width; img_ptr = picture->data[0] + y*picture->linesize[0]; - for(x = 0; x < width; x++, index++) { + for(x = 0; x < avctx->width; x++, index++) { *img_ptr++ = image->comps[0].data[index] >> adjust[0]; if(image->numcomps > 2 && check_image_attributes(image)) { *img_ptr++ = image->comps[1].data[index] >> adjust[1];