]> git.sesse.net Git - vlc/commitdiff
* set correct AR on theora video.
authorDerk-Jan Hartman <hartman@videolan.org>
Wed, 30 Jun 2004 22:44:41 +0000 (22:44 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Wed, 30 Jun 2004 22:44:41 +0000 (22:44 +0000)
  this is also broken for encoding, but i'm not sure how to fix this.

modules/codec/theora.c

index c533666628373087b51b1d068dd40c86564e3e70..ef2c4adf019298dbda27ad9b76a6e0b5d830592c 100644 (file)
@@ -214,11 +214,16 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         p_dec->fmt_out.video.i_height = p_sys->ti.height;
 
         if( p_sys->ti.aspect_denominator && p_sys->ti.aspect_numerator )
+        {
             p_dec->fmt_out.video.i_aspect = ((int64_t)VOUT_ASPECT_FACTOR) *
-                p_sys->ti.aspect_numerator / p_sys->ti.aspect_denominator;
+                ( p_sys->ti.aspect_numerator * p_sys->ti.width ) /
+                ( p_sys->ti.aspect_denominator * p_sys->ti_height );
+        }
         else
+        {
             p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR *
                 p_sys->ti.frame_width / p_sys->ti.frame_height;
+        }
 
         msg_Dbg( p_dec, "%dx%d %.02f fps video, frame content "
                  "is %dx%d with offset (%d,%d).",