]> git.sesse.net Git - vlc/commitdiff
* modules/video_output/x11/xcommon.c: support changing aspect-ratio on-the-fly.
authorGildas Bazin <gbazin@videolan.org>
Fri, 28 Oct 2005 07:04:40 +0000 (07:04 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 28 Oct 2005 07:04:40 +0000 (07:04 +0000)
modules/video_output/x11/xcommon.c

index a1c3f671eeea1ca65f802c39b2bca9a0bfe500b6..54b51d81413db09166e8431ae49ff7f1db70adb3 100644 (file)
@@ -848,15 +848,20 @@ static int ManageVideo( vout_thread_t *p_vout )
     }
 
 #ifndef MODULE_NAME_IS_x11
-    if( p_vout->fmt_out.i_x_offset != p_vout->fmt_in.i_x_offset ||
-        p_vout->fmt_out.i_y_offset != p_vout->fmt_in.i_y_offset ||
-        p_vout->fmt_out.i_visible_width != p_vout->fmt_in.i_visible_width ||
-        p_vout->fmt_out.i_visible_height != p_vout->fmt_in.i_visible_height )
+    if( p_vout->i_changes & VOUT_CROP_CHANGE ||
+        p_vout->i_changes & VOUT_ASPECT_CHANGE )
     {
+        p_vout->i_changes &= ~VOUT_CROP_CHANGE;
+        p_vout->i_changes &= ~VOUT_ASPECT_CHANGE;
+
         p_vout->fmt_out.i_x_offset = p_vout->fmt_in.i_x_offset;
         p_vout->fmt_out.i_y_offset = p_vout->fmt_in.i_y_offset;
         p_vout->fmt_out.i_visible_width = p_vout->fmt_in.i_visible_width;
         p_vout->fmt_out.i_visible_height = p_vout->fmt_in.i_visible_height;
+        p_vout->fmt_out.i_aspect = p_vout->fmt_in.i_aspect;
+        p_vout->fmt_out.i_sar_num = p_vout->fmt_in.i_sar_num;
+        p_vout->fmt_out.i_sar_den = p_vout->fmt_in.i_sar_den;
+        p_vout->output.i_aspect = p_vout->fmt_in.i_aspect;
         p_vout->i_changes |= VOUT_SIZE_CHANGE;
     }
 #endif