vlc | branch: master | Steve Lhomme <[email protected]> | Mon Oct 10 16:46:25 
2016 +0200| [e63726680d12a5ff79482431f56ac9e0d8fab990] | committer: 
Jean-Baptiste Kempf

libavcodec: fix the D3D11 slice index used by the decoder

This allows arbitrary slice index in the output buffer we provide the decoder.

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

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

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 5831c6e..e7ffbb0 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -994,6 +994,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int 
codec_id, const video_forma
             assert(texDesc.Format == sys->render);
             assert(texDesc.BindFlags & D3D11_BIND_DECODER);
 
+#if !LIBAVCODEC_VERSION_CHECK( 57, 27, 2, 61, 102 )
             if (pic->p_sys->slice_index != surface_idx)
             {
                 msg_Warn(va, "d3d11va requires decoding slices to be the first 
in the texture (%d/%d)",
@@ -1001,6 +1002,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int 
codec_id, const video_forma
                 sys->b_extern_pool = false;
                 break;
             }
+#endif
 
             viewDesc.Texture2D.ArraySlice = pic->p_sys->slice_index;
             hr = ID3D11VideoDevice_CreateVideoDecoderOutputView( 
(ID3D11VideoDevice*) dx_sys->d3ddec,

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to