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

Hannes Domani git at videolan.org
Thu Aug 28 21:11:28 CEST 2014


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

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

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

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

 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 fc959fc..1d7c7c8 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