summaryrefslogtreecommitdiffstats
path: root/libavcodec/dxva2.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-10-20 19:31:34 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2016-10-20 19:31:34 +0200
commit8bd38ec5bde1d2691d6385975a2bad61538188bf (patch)
treed33651548121ddbaa81333a3ad760960daaa719f /libavcodec/dxva2.c
parent5702416c57afb2bb062eb69d60fc42c31c91b674 (diff)
downloadffmpeg-streaming-8bd38ec5bde1d2691d6385975a2bad61538188bf.zip
ffmpeg-streaming-8bd38ec5bde1d2691d6385975a2bad61538188bf.tar.gz
dxva2: fix surface selection when compiled with both d3d11va and dxva2
Fixes a regression introduced in 9b462a0b9
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 e168233..04a9c11 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)
{
@@ -54,6 +54,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