[vlc-commits] d3d11va: CreateVideoDecoderOutputView() shouldn't fail because of incorrect init

Steve Lhomme git at videolan.org
Wed May 3 17:32:55 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue May  2 13:52:02 2017 +0200| [5f508c49474a4a14d3768660c72c0f799e401c71] | committer: Jean-Baptiste Kempf

d3d11va: CreateVideoDecoderOutputView() shouldn't fail because of incorrect init

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

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

 modules/codec/avcodec/d3d11va.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 1f96940e4a..85e7d25cae 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -389,6 +389,9 @@ static int Get(vlc_va_t *va, picture_t *pic, uint8_t **data)
                                                              &p_sys->decoder );
         if (FAILED(hr)) {
             msg_Warn(va, "CreateVideoDecoderOutputView %d failed. (hr=0x%0lx)", p_sys->slice_index, hr);
+            D3D11_TEXTURE2D_DESC texDesc;
+            ID3D11Texture2D_GetDesc(p_sys->texture[KNOWN_DXGI_INDEX], &texDesc);
+            assert(texDesc.BindFlags & D3D11_BIND_DECODER);
             p_sys->decoder = NULL;
         }
     }



More information about the vlc-commits mailing list