diff roqvideodec.c @ 5188:c2a475157299 libavcodec

add width and height in context and use them patch by Vitor: [vitor1001 gmail com]
author benoit
date Tue, 26 Jun 2007 20:10:26 +0000
parents b8e8aa53f613
children 0af35881395e
line wrap: on
line diff
--- a/roqvideodec.c	Tue Jun 26 18:01:15 2007 +0000
+++ b/roqvideodec.c	Tue Jun 26 20:10:26 2007 +0000
@@ -145,11 +145,11 @@
         }
 
         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 @@
     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;