[vlc-commits] d3d11va: remove dual creation of ID3D11VideoContext

Steve Lhomme git at videolan.org
Mon Feb 3 16:59:05 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb  3 16:52:49 2020 +0100| [e1adf6af545117c5af585966f9e113a632067337] | committer: Steve Lhomme

d3d11va: remove dual creation of ID3D11VideoContext

It's created in the pool pf_create_device callback.

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

 modules/codec/avcodec/d3d11va.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 1a5e689f1a..0295bcf71b 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -281,16 +281,6 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat hwfmt, const
     if (sys->d3d_dev.context_mutex == INVALID_HANDLE_VALUE)
         msg_Warn(va, "No mutex found to lock the decoder");
 
-    void *d3dvidctx = NULL;
-    hr = ID3D11DeviceContext_QueryInterface(sys->d3d_dev.d3dcontext, &IID_ID3D11VideoContext, &d3dvidctx);
-    if (FAILED(hr)) {
-        msg_Err(va, "Could not Query ID3D11VideoContext Interface from the picture. (hr=0x%lX)", hr);
-        D3D11_ReleaseDevice(&sys->d3d_dev);
-        // TODO we can try all adapters to see if there's one that can decode
-        goto error;
-    }
-    sys->hw.video_context = d3dvidctx;
-
     struct va_pool_cfg pool_cfg = {
         D3dCreateDevice,
         DxDestroySurfaces,



More information about the vlc-commits mailing list