[vlc-commits] DirectDraw/Direct3D: make a clean copy of the video-format

Hannes Domani git at videolan.org
Wed Sep 17 07:44:07 CEST 2014


vlc/vlc-2.2 | branch: master | Hannes Domani <ssbssa at yahoo.de> | Thu Aug 28 14:08:58 2014 +0200| [af92c10c722e60a1845ac0513b93875912253e2b] | committer: Jean-Baptiste Kempf

DirectDraw/Direct3D: make a clean copy of the video-format

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 2f3d2d96b82b4eea9a17861b3da294457d1b4896)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/msw/direct3d.c |    3 ++-
 modules/video_output/msw/directx.c  |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index 4b62a56..7fa4585 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -228,7 +228,8 @@ static int Open(vlc_object_t *object)
     var_AddCallback(vd, "video-wallpaper", DesktopCallback, NULL);
 
     /* Setup vout_display now that everything is fine */
-    vd->fmt  = fmt;
+    video_format_Clean(&vd->fmt);
+    video_format_Copy(&vd->fmt, &fmt);
     vd->info = info;
 
     vd->pool    = Pool;
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index 4832fd0..afaa8f8 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -210,7 +210,8 @@ static int Open(vlc_object_t *object)
     var_AddCallback(vd, "video-wallpaper", WallpaperCallback, NULL);
 
     /* Setup vout_display now that everything is fine */
-    vd->fmt     = fmt;
+    video_format_Clean(&vd->fmt);
+    video_format_Copy(&vd->fmt, &fmt);
     vd->info    = info;
 
     vd->pool    = Pool;



More information about the vlc-commits mailing list