summaryrefslogtreecommitdiff
path: root/libavcodec/dxva2_vc1.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_vc1.c
parentf8a42d4f260db3eae4399fa8bd8c8c2c1d38f23a (diff)
dxva2: Factorize DXVA context validity test into a single macro
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/dxva2_vc1.c')
-rw-r--r--libavcodec/dxva2_vc1.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index d170e18237..0672c97a48 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -264,9 +264,7 @@ static int dxva2_vc1_start_frame(AVCodecContext *avctx,
AVDXVAContext *ctx = avctx->hwaccel_context;
struct dxva2_picture_context *ctx_pic = v->s.current_picture_ptr->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;
assert(ctx_pic);