From b276a3383f9e193fc464f5be55c1479c7a2b3508 Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Fri, 28 Oct 2005 07:04:40 +0000 Subject: [PATCH] * modules/video_output/x11/xcommon.c: support changing aspect-ratio on-the-fly. --- modules/video_output/x11/xcommon.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c index a1c3f671ee..54b51d8141 100644 --- a/modules/video_output/x11/xcommon.c +++ b/modules/video_output/x11/xcommon.c @@ -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 -- 2.39.2