diff options
author | Steve Lhomme <robux4@gmail.com> | 2017-01-13 14:01:05 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-01-16 02:54:04 +0100 |
commit | 77742c75c5503c848447814a96f16abc6b9aa5f4 (patch) | |
tree | ceb6726437589c4b6b7a6fa24c0d533b22e34010 /libavcodec/dxva2_h264.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_h264.c')
-rw-r--r-- | libavcodec/dxva2_h264.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index 82a772d38b..59fa5e3769 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -450,9 +450,7 @@ static int dxva2_h264_start_frame(AVCodecContext *avctx, AVDXVAContext *ctx = avctx->hwaccel_context; struct dxva2_picture_context *ctx_pic = h->cur_pic_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); |