]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/qsvvpp.c
avcodec/v210dec: move DSP function setting into dedicated function
[ffmpeg] / libavfilter / qsvvpp.c
index 2c012956280e277bfd63da3994a04d41333d8b6a..06efdf50891d006fa5e93345da186388bd125e16 100644 (file)
@@ -142,7 +142,7 @@ static int pix_fmt_to_mfx_fourcc(int format)
         return MFX_FOURCC_NV12;
     case AV_PIX_FMT_YUYV422:
         return MFX_FOURCC_YUY2;
-    case AV_PIX_FMT_RGB32:
+    case AV_PIX_FMT_BGRA:
         return MFX_FOURCC_RGB4;
     }
 
@@ -503,6 +503,11 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s)
         }
     }
 
+    if (ret != MFX_ERR_NONE) {
+        av_log(avctx, AV_LOG_ERROR, "Error getting the session handle\n");
+        return AVERROR_UNKNOWN;
+    }
+
     /* create a "slave" session with those same properties, to be used for vpp */
     ret = MFXInit(impl, &ver, &s->session);
     if (ret != MFX_ERR_NONE) {