diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2007-06-27 00:10:26 +0400 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2007-06-27 00:10:26 +0400 |
commit | 9489d2ef3f61fecd1aa8f31cd816d9c6d766bf23 (patch) | |
tree | 6edacb530bb25d7b0f12e41dc9b0050c09864bad /libavcodec/roqvideodec.c | |
parent | dad66beeffdd30aa0c7dd7d657a40de0a2c2aa92 (diff) |
add width and height in context and use them
patch by Vitor: [vitor1001 gmail com]
Originally committed as revision 9438 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/roqvideodec.c')
-rw-r--r-- | libavcodec/roqvideodec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c index 2836912f78..8a3328ecc6 100644 --- a/libavcodec/roqvideodec.c +++ b/libavcodec/roqvideodec.c @@ -145,11 +145,11 @@ static void roqvideo_decode_frame(RoqContext *ri) } xpos += 16; - if (xpos >= ri->avctx->width) { - xpos -= ri->avctx->width; + if (xpos >= ri->width) { + xpos -= ri->width; ypos += 16; } - if(ypos >= ri->avctx->height) + if(ypos >= ri->height) break; } } @@ -160,6 +160,8 @@ static int roq_decode_init(AVCodecContext *avctx) RoqContext *s = avctx->priv_data; s->avctx = avctx; + s->width = avctx->width; + s->height = avctx->height; s->last_frame = &s->frames[0]; s->current_frame = &s->frames[1]; avctx->pix_fmt = PIX_FMT_YUV444P; |