diff rv30.c @ 8568:4a93620c5aac libavcodec

30l: when reading mb_offset in RV30 slice header its size should be calculated from current frame dimensions
author kostya
date Sun, 11 Jan 2009 10:50:00 +0000
parents 48a4d9f4c6f8
children e9d9d946f213
line wrap: on
line diff
--- a/rv30.c	Sun Jan 11 10:40:05 2009 +0000
+++ b/rv30.c	Sun Jan 11 10:50:00 2009 +0000
@@ -51,13 +51,12 @@
     skip_bits1(gb);
     si->pts = get_bits(gb, 13);
     rpr = get_bits(gb, r->rpr);
-    if(!rpr){
-        si->width  = w;
-        si->height = h;
-    }else{
-        si->width  = r->s.avctx->extradata[6 + rpr*2] << 2;
-        si->height = r->s.avctx->extradata[7 + rpr*2] << 2;
+    if(rpr){
+        w = r->s.avctx->extradata[6 + rpr*2] << 2;
+        h = r->s.avctx->extradata[7 + rpr*2] << 2;
     }
+    si->width  = w;
+    si->height = h;
     mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
     mb_bits = ff_rv34_get_start_offset(gb, mb_size);
     si->start = get_bits(gb, mb_bits);