aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libopenjpeg.c
diff options
context:
space:
mode:
authorJai Menon <jmenon86@gmail.com>2009-05-26 16:59:05 +0000
committerJai Menon <jmenon86@gmail.com>2009-05-26 16:59:05 +0000
commitd95545166cc522c448cc243bf154733ebab04b14 (patch)
tree75dfe80d84172cd565b5678794b6b8951f15b89e /libavcodec/libopenjpeg.c
parent34d11b875f96cab642893f12656f24899ca42ad7 (diff)
downloadffmpeg-d95545166cc522c448cc243bf154733ebab04b14.tar.gz
Use dimensions stored in AVCodecContext instead of local variables.
Originally committed as revision 18954 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/libopenjpeg.c')
-rw-r--r--libavcodec/libopenjpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/libopenjpeg.c b/libavcodec/libopenjpeg.c
index a3035fd290..2c30c3000a 100644
--- a/libavcodec/libopenjpeg.c
+++ b/libavcodec/libopenjpeg.c
@@ -144,10 +144,10 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
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];