[vlc-commits] d3d11_player: only update the VLC render target when it changes

Steve Lhomme git at videolan.org
Mon Oct 14 09:45:51 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Oct 14 09:44:51 2019 +0200| [e8e720da58ebae942b9bbd1f7c026bf2edeb23a2] | committer: Steve Lhomme

d3d11_player: only update the VLC render target when it changes

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

 doc/libvlc/d3d11_player.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/libvlc/d3d11_player.cpp b/doc/libvlc/d3d11_player.cpp
index 12cf01bba1..f74ab5c528 100644
--- a/doc/libvlc/d3d11_player.cpp
+++ b/doc/libvlc/d3d11_player.cpp
@@ -138,6 +138,7 @@ static bool UpdateOutput_cb( void *opaque, const libvlc_video_direct3d_cfg_t *cf
     hr = ctx->d3deviceVLC->CreateRenderTargetView(ctx->textureVLC, &renderTargetViewDesc, &ctx->textureRenderTarget);
     if (FAILED(hr)) return false;
 
+    ctx->d3dctxVLC->OMSetRenderTargets( 1, &ctx->textureRenderTarget, NULL );
 
     out->surface_format = renderFormat;
     out->full_range     = true;
@@ -183,7 +184,6 @@ static bool SelectPlane_cb( void *opaque, size_t plane )
     struct render_context *ctx = static_cast<struct render_context *>( opaque );
     if ( plane != 0 ) // we only support one packed RGBA plane (DXGI_FORMAT_R8G8B8A8_UNORM)
         return false;
-    ctx->d3dctxVLC->OMSetRenderTargets( 1, &ctx->textureRenderTarget, NULL );
     return true;
 }
 



More information about the vlc-commits mailing list