diff options
author | Steve Lhomme <robux4@gmail.com> | 2017-01-03 17:31:51 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2017-01-12 16:19:13 +0100 |
commit | ac3c3ee678e51b05a2a7c30ce79465db46ba01fa (patch) | |
tree | 2b328ee882e4124bca731b164a636427adfca585 | |
parent | f67235a28cef44fcd97ae74ad53bbbc0d7f63d60 (diff) | |
download | ffmpeg-ac3c3ee678e51b05a2a7c30ce79465db46ba01fa.tar.gz |
dxva2: allow an empty array of ID3D11VideoDecoderOutputView
We can pick the correct slice index directly from the ID3D11VideoDecoderOutputView
casted from data[3].
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavcodec/dxva2_internal.h | 4 | ||||
-rw-r--r-- | libavcodec/version.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h index daf54b20e5..8b774b14f3 100644 --- a/libavcodec/dxva2_internal.h +++ b/libavcodec/dxva2_internal.h @@ -73,7 +73,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) @@ -93,7 +93,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, diff --git a/libavcodec/version.h b/libavcodec/version.h index 5b6fb6ce59..7348a0c267 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #define LIBAVCODEC_VERSION_MAJOR 57 #define LIBAVCODEC_VERSION_MINOR 30 -#define LIBAVCODEC_VERSION_MICRO 2 +#define LIBAVCODEC_VERSION_MICRO 3 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ |