Index: theora.c
===================================================================
--- theora.c	(revision 15942)
+++ theora.c	(working copy)
@@ -294,8 +294,8 @@
     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.width ) /
-            ( p_sys->ti.aspect_denominator * p_sys->ti.height );
+            ( p_sys->ti.aspect_numerator * p_dec->fmt_out.video.i_width ) /
+            ( p_sys->ti.aspect_denominator * p_dec->fmt_out.video.i_height );
     }
     else
     {
@@ -557,7 +557,7 @@
             i_src_yoffset /= 2;
         }
 
-        p_src += (i_src_yoffset * i_src_stride + i_src_yoffset);
+        p_src += (i_src_yoffset * i_src_stride + i_src_xoffset);
 
         for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ )
         {
