]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit 'e05e5920a4e1f1f15cc8a7c843159d519f6ec18e'
authorJames Almer <jamrial@gmail.com>
Tue, 11 Sep 2018 16:41:07 +0000 (13:41 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 11 Sep 2018 16:41:07 +0000 (13:41 -0300)
* commit 'e05e5920a4e1f1f15cc8a7c843159d519f6ec18e':
  qsv: Error out if getting session handle failed in avfilter

Merged-by: James Almer <jamrial@gmail.com>
libavfilter/qsvvpp.c
libavfilter/vf_deinterlace_qsv.c
libavfilter/vf_scale_qsv.c

index 2c012956280e277bfd63da3994a04d41333d8b6a..7ee1e565b6481d1ad8777950261eb9214eb55438 100644 (file)
@@ -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) {
index c9e76c6056a1a8157fc87ba8e48a2749563ebf46..d6b02e98c5b2889edf162d64794f4cffca38e892 100644 (file)
@@ -202,6 +202,11 @@ static int init_out_session(AVFilterContext *ctx)
         }
     }
 
+    if (err != MFX_ERR_NONE) {
+        av_log(ctx, AV_LOG_ERROR, "Error getting the session handle\n");
+        return AVERROR_UNKNOWN;
+    }
+
     /* create a "slave" session with those same properties, to be used for
      * actual deinterlacing */
     err = MFXInit(impl, &ver, &s->session);
index d1189942d126c9de1b13f04974693ed82244433d..7d593b2b211ea50a9cf65c220c9f10bee9c03ed8 100644 (file)
@@ -302,6 +302,11 @@ static int init_out_session(AVFilterContext *ctx)
         }
     }
 
+    if (err != MFX_ERR_NONE) {
+        av_log(ctx, AV_LOG_ERROR, "Error getting the session handle\n");
+        return AVERROR_UNKNOWN;
+    }
+
     /* create a "slave" session with those same properties, to be used for
      * actual scaling */
     err = MFXInit(impl, &ver, &s->session);