diff options
author | Steve Lhomme <robux4@gmail.com> | 2017-01-13 14:01:07 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-01-16 02:54:04 +0100 |
commit | 8fb48659018f17827c2d5a3ba72263f421fdfa2d (patch) | |
tree | d6548da5046a4958b1bc05b72bf5accf284b25ca /libavcodec/dxva2_internal.h | |
parent | 153b36fc62849e0e1540a43829794e0503994ebb (diff) | |
download | ffmpeg-8fb48659018f17827c2d5a3ba72263f421fdfa2d.tar.gz |
dxva2: allow an empty array of ID3D11VideoDecoderOutputView
We can pick the correct slice index directly from the ID3D11VideoDecoderOutputView
casted from data[3].
Also added myself as maintainer for DXVA2 and D3D11VA.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dxva2_internal.h')
-rw-r--r-- | libavcodec/dxva2_internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h index e5322efd54..dfff4d6b47 100644 --- a/libavcodec/dxva2_internal.h +++ b/libavcodec/dxva2_internal.h @@ -78,7 +78,7 @@ typedef union { #define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD ? ctx->d3d11va.cfg->ConfigResidDiffAccelerator : ctx->dxva2.cfg->ConfigResidDiffAccelerator) #define DXVA_CONTEXT_VALID(avctx, ctx) (DXVA_CONTEXT_DECODER(avctx, ctx) && \ DXVA_CONTEXT_CFG(avctx, ctx) && \ - DXVA_CONTEXT_COUNT(avctx, ctx)) + (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD || ctx->dxva2.surface_count)) #elif CONFIG_DXVA2 #define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ctx->dxva2.workaround) #define DXVA_CONTEXT_COUNT(avctx, ctx) (ctx->dxva2.surface_count) @@ -98,7 +98,7 @@ typedef union { #define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (ctx->d3d11va.cfg->ConfigBitstreamRaw) #define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (ctx->d3d11va.cfg->ConfigIntraResidUnsigned) #define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ctx->d3d11va.cfg->ConfigResidDiffAccelerator) -#define DXVA_CONTEXT_VALID(avctx, ctx) (ctx->d3d11va.decoder && ctx->d3d11va.cfg && ctx->d3d11va.surface_count) +#define DXVA_CONTEXT_VALID(avctx, ctx) (ctx->d3d11va.decoder && ctx->d3d11va.cfg) #endif unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, |