[vlc-commits] direct3d9: fix rendering of software sources

Steve Lhomme git at videolan.org
Wed Feb 12 17:09:10 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Feb 12 17:00:48 2020 +0100| [73571d57f2d48db29e6b2f1699d0935a12f2c401] | committer: Steve Lhomme

direct3d9: fix rendering of software sources

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

 modules/video_output/win32/direct3d9.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 6f5d27c7c0..db64693eb7 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1183,8 +1183,6 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
      * wrapper, we can't */
     IDirect3DSurface9 *surface;
 
-    picture_sys_d3d9_t *p_sys = ActiveD3D9PictureSys(picture);
-    surface = p_sys->surface;
     if ( !is_d3d9_opaque(picture->format.i_chroma) )
     {
         D3DLOCKED_RECT d3drect;
@@ -1200,9 +1198,10 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
         picture_CopyPixels(&fake_pic, picture);
         IDirect3DSurface9_UnlockRect(surface);
     }
-    else if (picture->context)
+    else
     {
         const picture_sys_d3d9_t *picsys = ActiveD3D9PictureSys(picture);
+        surface = picsys->surface;
         if (picsys->surface != surface)
         {
             D3DSURFACE_DESC srcDesc, dstDesc;



More information about the vlc-commits mailing list