[vlc-commits] ddraw: avoid copying vd->info

Rémi Denis-Courmont git at videolan.org
Thu Dec 20 19:42:54 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec 19 22:25:10 2018 +0200| [4e3c5758fdd0f14e97143b36b2c68a12b95dc1b1] | committer: Rémi Denis-Courmont

ddraw: avoid copying vd->info

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

 modules/video_output/win32/directdraw.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/modules/video_output/win32/directdraw.c b/modules/video_output/win32/directdraw.c
index 2c68337ec2..78670e6c17 100644
--- a/modules/video_output/win32/directdraw.c
+++ b/modules/video_output/win32/directdraw.c
@@ -220,11 +220,10 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     if (DirectXOpen(vd, &fmt))
         goto error;
 
-    /* */
-    vout_display_info_t info = vd->info;
-    info.is_slow = true;
-    info.has_double_click = true;
-    info.has_pictures_invalid = true;
+    /* Setup vout_display now that everything is fine */
+    vd->info.is_slow = true;
+    vd->info.has_double_click = true;
+    vd->info.has_pictures_invalid = true;
 
     /* Interaction TODO support starting with wallpaper mode */
     vlc_mutex_init(&sys->lock);
@@ -235,10 +234,8 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     var_Change(vd, "video-wallpaper", VLC_VAR_SETTEXT, _("Wallpaper"));
     var_AddCallback(vd, "video-wallpaper", WallpaperCallback, NULL);
 
-    /* Setup vout_display now that everything is fine */
     video_format_Clean(fmtp);
     video_format_Copy(fmtp, &fmt);
-    vd->info    = info;
 
     vd->pool    = Pool;
     vd->prepare = NULL;



More information about the vlc-commits mailing list