]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dxva2_mpeg2.c
Merge commit 'fc94a1acc27ab7296edce3fa81ef36691af5c134'
[ffmpeg] / libavcodec / dxva2_mpeg2.c
index c2f0b58beebb5918f965256702601c195618f6a9..14ac48f5ada7e5d128ff5e6e00a284b0b945ada2 100644 (file)
@@ -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);