Message ID | 20220401092416.1018-2-tong1.wu@intel.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/3] avutil/hwcontext_d3d11va: add a format check for staging texture | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index f69fb3fc9c..0ec0e07d3a 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -254,6 +254,11 @@ static int d3d11va_frames_init(AVHWFramesContext *ctx) return AVERROR(EINVAL); } + if (!hwctx->BindFlags) { + av_log(ctx, AV_LOG_DEBUG, "Add render target bindflag for texture\n"); + hwctx->BindFlags = D3D11_BIND_RENDER_TARGET; + } + texDesc = (D3D11_TEXTURE2D_DESC){ .Width = ctx->width, .Height = ctx->height,
When uploading rawvideos using d3d11va hardware framecontext, the bindflag is not initialized and will cause creating texture failure. Now fix it, assign it the value of D3D11_BIND_RENDER_TARGET. Signed-off-by: Tong Wu <tong1.wu@intel.com> --- libavutil/hwcontext_d3d11va.c | 5 +++++ 1 file changed, 5 insertions(+)