[vlc-commits] Revert "direct3d11: only set the vd->fmt once"

Steve Lhomme git at videolan.org
Wed Aug 1 15:16:40 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Aug  1 15:09:16 2018 +0200| [a70ba8fa00cad6b5b737c5fce2b4e14f0f2331c2] | committer: Steve Lhomme

Revert "direct3d11: only set the vd->fmt once"

This reverts commit 5801f7cda364930c27886ab3b50505389fed9ec5.

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

 modules/video_output/win32/direct3d11.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index e294dbc453..980585d229 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1217,7 +1217,8 @@ static int Direct3D11Open(vout_display_t *vd)
 
     D3D11SetColorSpace(vd);
 
-    video_format_t fmt = vd->source;
+    video_format_t fmt;
+    video_format_Copy(&fmt, &vd->source);
     int err = SetupOutputFormat(vd, &fmt);
     if (err != VLC_SUCCESS)
     {
@@ -1249,6 +1250,9 @@ static int Direct3D11Open(vout_display_t *vd)
         return VLC_EGENERIC;
     }
 
+    video_format_Clean(&vd->fmt);
+    vd->fmt = fmt;
+
     return VLC_SUCCESS;
 }
 
@@ -1322,8 +1326,7 @@ static int SetupOutputFormat(vout_display_t *vd, video_format_t *fmt)
         Direct3D11DestroyResources(vd);
         return VLC_EGENERIC;
     }
-    video_format_Clean(&vd->fmt);
-    video_format_Copy(&vd->fmt, fmt);
+    vd->fmt = *fmt;
 
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list