summaryrefslogtreecommitdiff
path: root/libavutil/hwcontext_d3d11va.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2022-07-09 00:10:37 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2022-07-18 00:32:14 +0200
commit6cbb7d673d39e3077923123af9bc5425771d8b59 (patch)
treeaca8d862965449e933dc96c948f6aaff163bcd9e /libavutil/hwcontext_d3d11va.c
parent30bbc0a624bc43fa4aaabd695546ad426d0d086b (diff)
downloadffmpeg-6cbb7d673d39e3077923123af9bc5425771d8b59.tar.gz
avutil/hwcontext_d3d11va: update hwctx flags from input texture
At least QSV relies on those being set correctly when deriving a hwctx.
Diffstat (limited to 'libavutil/hwcontext_d3d11va.c')
-rw-r--r--libavutil/hwcontext_d3d11va.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c
index 6355bd1e29..d492489b79 100644
--- a/libavutil/hwcontext_d3d11va.c
+++ b/libavutil/hwcontext_d3d11va.c
@@ -287,6 +287,10 @@ static int d3d11va_frames_init(AVHWFramesContext *ctx)
av_log(ctx, AV_LOG_ERROR, "User-provided texture has mismatching parameters\n");
return AVERROR(EINVAL);
}
+
+ ctx->initial_pool_size = texDesc2.ArraySize;
+ hwctx->BindFlags = texDesc2.BindFlags;
+ hwctx->MiscFlags = texDesc2.MiscFlags;
} else if (!(texDesc.BindFlags & D3D11_BIND_RENDER_TARGET) && texDesc.ArraySize > 0) {
hr = ID3D11Device_CreateTexture2D(device_hwctx->device, &texDesc, NULL, &hwctx->texture);
if (FAILED(hr)) {