summaryrefslogtreecommitdiffstats
path: root/libavcodec/dxva2.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-11-07 09:59:28 +0100
committerAnton Khirnov <anton@khirnov.net>2016-11-07 10:05:12 +0100
commitfabfbfe5710050812147f93a351a53fdda56ff8c (patch)
treec18b9b8e119b19cedf5a8e6276399d7c975a6d57 /libavcodec/dxva2.c
parentdb0b3dccb3842de134721e8d5c275f56d384340d (diff)
downloadffmpeg-streaming-fabfbfe5710050812147f93a351a53fdda56ff8c.zip
ffmpeg-streaming-fabfbfe5710050812147f93a351a53fdda56ff8c.tar.gz
dxva2: fix surface selection when compiled with both d3d11va and dxva2
Fixes a regression introduced in be630b1e08ebe8f766b1798accd6b8e5e096f5aa Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/dxva2.c')
-rw-r--r--libavcodec/dxva2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c
index eeac474..9fedd03 100644
--- a/libavcodec/dxva2.c
+++ b/libavcodec/dxva2.c
@@ -41,7 +41,7 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx,
void *surface = ff_dxva2_get_surface(frame);
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 (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD && ctx->d3d11va.surface[i] == surface) {
D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc;
@@ -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)
return i;
#endif
+ }
assert(0);
return 0;
OpenPOWER on IntegriCloud