[vlc-devel] [PATCH 1/2] d3d11va: fill the formatTexture in the context
Steve Lhomme
robux4 at videolabs.io
Sat Aug 19 08:55:27 CEST 2017
It might be used by the vout to determine if it's I420 or not
---
modules/codec/avcodec/d3d11va.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 8987b42220..be9b649ddd 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -209,6 +209,11 @@ static struct va_pic_context *CreatePicContext(
goto done;
pic_ctx->s.destroy = d3d11_pic_context_destroy;
pic_ctx->s.copy = d3d11_pic_context_copy;
+
+ D3D11_TEXTURE2D_DESC txDesc;
+ ID3D11Texture2D_GetDesc((ID3D11Texture2D*)p_resource, &txDesc);
+
+ pic_ctx->picsys.formatTexture = txDesc.Format;
pic_ctx->picsys.context = context;
pic_ctx->picsys.slice_index = slice;
pic_ctx->picsys.decoder = decoderSurface;
--
2.12.1
More information about the vlc-devel
mailing list