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_mpeg2.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_mpeg2.c')
-rw-r--r-- | libavcodec/dxva2_mpeg2.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c index c2f0b58bee..14ac48f5ad 100644 --- a/libavcodec/dxva2_mpeg2.c +++ b/libavcodec/dxva2_mpeg2.c @@ -262,9 +262,7 @@ static int dxva2_mpeg2_start_frame(AVCodecContext *avctx, struct dxva2_picture_context *ctx_pic = 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); |