diff options
author | Steve Lhomme <robux4@gmail.com> | 2017-01-03 17:31:49 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2017-01-08 16:41:24 +0100 |
commit | 0ac2d86c4758e1419934905b6c092910296aa16a (patch) | |
tree | 9860634c0235f3ccacfee9491bbf073d54779008 /libavcodec/dxva2_mpeg2.c | |
parent | f8a42d4f260db3eae4399fa8bd8c8c2c1d38f23a (diff) | |
download | ffmpeg-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_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 2d88f9b804..a45904963c 100644 --- a/libavcodec/dxva2_mpeg2.c +++ b/libavcodec/dxva2_mpeg2.c @@ -263,9 +263,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); |