[vlc-devel] commit: Updated xcb to use new VOUT_DISPLAY_CHANGE_DISPLAY_SIZE parameter. (Laurent Aimar )

git version control git at videolan.org
Wed Sep 30 21:26:22 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Sep 30 21:24:22 2009 +0200| [d00aca23549c86f91af460fdc87f86725083f2ee] | committer: Laurent Aimar 

Updated xcb to use new VOUT_DISPLAY_CHANGE_DISPLAY_SIZE parameter.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d00aca23549c86f91af460fdc87f86725083f2ee
---

 modules/video_output/xcb/x11.c    |    8 +++++---
 modules/video_output/xcb/xvideo.c |    4 ++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 5e908e2..e97fdfd 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -451,10 +451,12 @@ static int Control (vout_display_t *vd, int query, va_list ap)
     {
         const vout_display_cfg_t *p_cfg =
             (const vout_display_cfg_t*)va_arg (ap, const vout_display_cfg_t *);
+        const bool is_forced = (bool)va_arg (ap, int);
 
-        if (vout_window_SetSize (p_sys->embed,
-                                  p_cfg->display.width,
-                                  p_cfg->display.height))
+        if (is_forced
+         && vout_window_SetSize (p_sys->embed,
+                                 p_cfg->display.width,
+                                 p_cfg->display.height))
             return VLC_EGENERIC;
 
         vout_display_place_t place;
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 65c15e9..50f4157 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -670,6 +670,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
     {
         const vout_display_cfg_t *cfg;
         const video_format_t *source;
+        bool is_forced;
 
         if (query == VOUT_DISPLAY_CHANGE_SOURCE_ASPECT
          || query == VOUT_DISPLAY_CHANGE_SOURCE_CROP)
@@ -681,10 +682,13 @@ static int Control (vout_display_t *vd, int query, va_list ap)
         {
             source = &vd->source;
             cfg = (const vout_display_cfg_t*)va_arg (ap, const vout_display_cfg_t *);
+            if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE)
+                is_forced = (bool)va_arg (ap, int);
         }
 
         /* */
         if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
+         && is_forced
          && (cfg->display.width  != vd->cfg->display.width
            ||cfg->display.height != vd->cfg->display.height)
          && vout_window_SetSize (p_sys->embed,




More information about the vlc-devel mailing list