summaryrefslogtreecommitdiff
path: root/libavcodec/dxva2_hevc.c
diff options
context:
space:
mode:
authorSteve Lhomme <robux4@gmail.com>2017-01-03 17:31:49 +0100
committerDiego Biurrun <diego@biurrun.de>2017-01-08 16:41:24 +0100
commit0ac2d86c4758e1419934905b6c092910296aa16a (patch)
tree9860634c0235f3ccacfee9491bbf073d54779008 /libavcodec/dxva2_hevc.c
parentf8a42d4f260db3eae4399fa8bd8c8c2c1d38f23a (diff)
downloadffmpeg-0ac2d86c4758e1419934905b6c092910296aa16a.tar.gz
dxva2: Factorize DXVA context validity test into a single macro
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/dxva2_hevc.c')
-rw-r--r--libavcodec/dxva2_hevc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/dxva2_hevc.c b/libavcodec/dxva2_hevc.c
index 673fada6e6..17548d25bb 100644
--- a/libavcodec/dxva2_hevc.c
+++ b/libavcodec/dxva2_hevc.c
@@ -365,9 +365,7 @@ static int dxva2_hevc_start_frame(AVCodecContext *avctx,
AVDXVAContext *ctx = avctx->hwaccel_context;
struct hevc_dxva2_picture_context *ctx_pic = h->ref->hwaccel_picture_private;
- if (DXVA_CONTEXT_DECODER(avctx, ctx) == NULL ||
- DXVA_CONTEXT_CFG(avctx, ctx) == NULL ||
- DXVA_CONTEXT_COUNT(avctx, ctx) <= 0)
+ if (!DXVA_CONTEXT_VALID(avctx, ctx))
return -1;
av_assert0(ctx_pic);