diff rv10.c @ 10614:b08c6f64a6c0 libavcodec

Store original width/height so that rv20 does not get stuck with some resolution. A sample file to show a difference is at issue833 (http://airfarce.com/video/000211fh.rm)
author michael
date Tue, 01 Dec 2009 22:30:03 +0000
parents 2ae4eb19665a
children d0657e337f91
line wrap: on
line diff
--- a/rv10.c	Tue Dec 01 21:10:37 2009 +0000
+++ b/rv10.c	Tue Dec 01 22:30:03 2009 +0000
@@ -362,8 +362,8 @@
             new_w= 4*((uint8_t*)s->avctx->extradata)[6+2*f];
             new_h= 4*((uint8_t*)s->avctx->extradata)[7+2*f];
         }else{
-            new_w= s->width; //FIXME wrong we of course must save the original in the context
-            new_h= s->height;
+            new_w= s->orig_width ;
+            new_h= s->orig_height;
         }
         if(new_w != s->width || new_h != s->height){
             av_log(s->avctx, AV_LOG_DEBUG, "attempting to change resolution to %dx%d\n", new_w, new_h);
@@ -453,8 +453,8 @@
     s->out_format = FMT_H263;
     s->codec_id= avctx->codec_id;
 
-    s->width = avctx->coded_width;
-    s->height = avctx->coded_height;
+    s->orig_width = s->width  = avctx->coded_width;
+    s->orig_height= s->height = avctx->coded_height;
 
     s->h263_long_vectors= ((uint8_t*)avctx->extradata)[3] & 1;
     avctx->sub_id= AV_RB32((uint8_t*)avctx->extradata + 4);