mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avutil/hwcontext_d3d11va: update hwctx flags from input texture
At least QSV relies on those being set correctly when deriving a hwctx.
This commit is contained in:
parent
30bbc0a624
commit
6cbb7d673d
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user