]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qsvdec.c
vaapi_h264: fix RefPicList[] field flags.
[ffmpeg] / libavcodec / qsvdec.c
index 4802932ea7c92c87e75625aef5240017def60a72..e19eba5b52ffdb145d3e8de82afa2a523c245380 100644 (file)
@@ -106,7 +106,7 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q)
             return AVERROR(ENOMEM);
     }
 
-    if (avctx->hwaccel_context) {
+    if (avctx->pix_fmt == AV_PIX_FMT_QSV && avctx->hwaccel_context) {
         AVQSVContext *user_ctx = avctx->hwaccel_context;
         session           = user_ctx->session;
         iopattern         = user_ctx->iopattern;