Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Lhomme <robux4@gmail.com>2017-01-13 16:01:05 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-01-16 04:54:04 +0300
commit77742c75c5503c848447814a96f16abc6b9aa5f4 (patch)
treeceb6726437589c4b6b7a6fa24c0d533b22e34010 /libavcodec/dxva2_hevc.c
parent367cac7827870054ae3bd6d4517e7b13f4f3f72c (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_hevc.c')
-rw-r--r--libavcodec/dxva2_hevc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/dxva2_hevc.c b/libavcodec/dxva2_hevc.c
index 5a312eaf23..981c8883ac 100644
--- a/libavcodec/dxva2_hevc.c
+++ b/libavcodec/dxva2_hevc.c
@@ -364,9 +364,7 @@ static int dxva2_hevc_start_frame(AVCodecContext *avctx,
AVDXVAContext *ctx = avctx->hwaccel_context;
struct hevc_dxva2_picture_context *ctx_pic = h->ref->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);