[vlc-commits] Win32 Vout: if a crop/aspect ratio is received, force the texture update

Steve Lhomme git at videolan.org
Mon Mar 9 20:43:18 CET 2015


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Mon Mar  9 16:11:31 2015 +0100| [994e4896e7ec385679fc1c3d131b8bb01420d584] | committer: Jean-Baptiste Kempf

Win32 Vout: if a crop/aspect ratio is received, force the texture update

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/msw/common.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/msw/common.c b/modules/video_output/msw/common.c
index cf7673b..8de44fd 100644
--- a/modules/video_output/msw/common.c
+++ b/modules/video_output/msw/common.c
@@ -618,17 +618,16 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
     case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:  /* const video_format_t *p_source */
     case VOUT_DISPLAY_CHANGE_SOURCE_CROP: {  /* const video_format_t *p_source */
         const vout_display_cfg_t *cfg;
-        const video_format_t *source;
 
         if (query == VOUT_DISPLAY_CHANGE_SOURCE_CROP ||
             query == VOUT_DISPLAY_CHANGE_SOURCE_ASPECT) {
+            const video_format_t *source = va_arg(args, const video_format_t *);
             cfg    = vd->cfg;
-            source = va_arg(args, const video_format_t *);
+            UpdateRects(vd, cfg, source, true);
         } else {
             cfg    = va_arg(args, const vout_display_cfg_t *);
-            source = &vd->source;
+            UpdateRects(vd, cfg, NULL, false);
         }
-        UpdateRects(vd, cfg, source, false);
         return VLC_SUCCESS;
     }
     case VOUT_DISPLAY_CHANGE_WINDOW_STATE: {       /* unsigned state */



More information about the vlc-commits mailing list