summaryrefslogtreecommitdiff
path: root/libavcodec/dxva2_vc1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dxva2_vc1.c')
-rw-r--r--libavcodec/dxva2_vc1.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index d170e18237..0672c97a48 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -264,9 +264,7 @@ static int dxva2_vc1_start_frame(AVCodecContext *avctx,
AVDXVAContext *ctx = avctx->hwaccel_context;
struct dxva2_picture_context *ctx_pic = v->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);