diff vp3.c @ 7967:6ac2c8312a2b libavcodec

Visible width/height fields were added in Theora 3.2
author conrad
date Wed, 01 Oct 2008 14:43:08 +0000
parents 14a49e087126
children 5ed5f94b9a97
line wrap: on
line diff
--- a/vp3.c	Wed Oct 01 14:40:29 2008 +0000
+++ b/vp3.c	Wed Oct 01 14:43:08 2008 +0000
@@ -2078,8 +2078,8 @@
         av_log(avctx, AV_LOG_DEBUG, "Old (<alpha3) Theora bitstream, flipped image\n");
     }
 
-    s->width = get_bits(gb, 16) << 4;
-    s->height = get_bits(gb, 16) << 4;
+    visible_width  = s->width  = get_bits(gb, 16) << 4;
+    visible_height = s->height = get_bits(gb, 16) << 4;
 
     if(avcodec_check_dimensions(avctx, s->width, s->height)){
         av_log(avctx, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n", s->width, s->height);
@@ -2096,10 +2096,10 @@
         skip_bits(gb, 32); /* total number of macroblocks in a frame */
     }
 
+    if (s->theora >= 0x030200) {
     visible_width  = get_bits_long(gb, 24);
     visible_height = get_bits_long(gb, 24);
 
-    if (s->theora >= 0x030200) {
         skip_bits(gb, 8); /* offset x */
         skip_bits(gb, 8); /* offset y */
     }