diff options
author | Steve Lhomme <robux4@gmail.com> | 2017-01-13 16:01:05 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-01-16 04:54:04 +0300 |
commit | 77742c75c5503c848447814a96f16abc6b9aa5f4 (patch) | |
tree | ceb6726437589c4b6b7a6fa24c0d533b22e34010 /libavcodec/dxva2_vp9.c | |
parent | 367cac7827870054ae3bd6d4517e7b13f4f3f72c (diff) |
dxva2: use a single macro to test if the DXVA context is valid
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dxva2_vp9.c')
-rw-r--r-- | libavcodec/dxva2_vp9.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/dxva2_vp9.c b/libavcodec/dxva2_vp9.c index 0c4996c020..d53b32764a 100644 --- a/libavcodec/dxva2_vp9.c +++ b/libavcodec/dxva2_vp9.c @@ -261,9 +261,7 @@ static int dxva2_vp9_start_frame(AVCodecContext *avctx, AVDXVAContext *ctx = avctx->hwaccel_context; struct vp9_dxva2_picture_context *ctx_pic = h->frames[CUR_FRAME].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); |