Commit fabfbfe5 authored by Hendrik Leppkes's avatar Hendrik Leppkes Committed by Anton Khirnov

dxva2: fix surface selection when compiled with both d3d11va and dxva2

Fixes a regression introduced in
be630b1eSigned-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent db0b3dcc
...@@ -41,7 +41,7 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, ...@@ -41,7 +41,7 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx,
void *surface = ff_dxva2_get_surface(frame); void *surface = ff_dxva2_get_surface(frame);
unsigned i; unsigned i;
for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) {
#if CONFIG_D3D11VA #if CONFIG_D3D11VA
if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD && ctx->d3d11va.surface[i] == surface) { if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD && ctx->d3d11va.surface[i] == surface) {
D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc; D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc;
...@@ -53,6 +53,7 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, ...@@ -53,6 +53,7 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx,
if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD && ctx->dxva2.surface[i] == surface) if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD && ctx->dxva2.surface[i] == surface)
return i; return i;
#endif #endif
}
assert(0); assert(0);
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment