]> granicus.if.org Git - handbrake/commitdiff
qsv: Fix a crash that can occur in hb_qsv_info_print() when QSV hardware exists in...
authorsr55 <sr55.hb@outlook.com>
Fri, 6 Jan 2017 20:43:05 +0000 (20:43 +0000)
committersr55 <sr55.hb@outlook.com>
Fri, 6 Jan 2017 20:44:26 +0000 (20:44 +0000)
libhb/qsv_common.c

index 8042b50b4d13969d9e9fd85b4c805cd421fb561a..3d8e7a2755035e31d0d91fc6cc0a15e068c6c12e 100644 (file)
@@ -769,21 +769,23 @@ void hb_qsv_info_print()
     hb_log("Intel Quick Sync Video support: %s",
            hb_qsv_available() ? "yes": "no");
 
-    // also print the details
-    if (qsv_hardware_version.Version)
-    {
-        hb_log(" - Intel Media SDK hardware: API %"PRIu16".%"PRIu16" (minimum: %"PRIu16".%"PRIu16")",
-               qsv_hardware_version.Major, qsv_hardware_version.Minor,
-               HB_QSV_MINVERSION_MAJOR,    HB_QSV_MINVERSION_MINOR);
-    }
-    if (qsv_software_version.Version)
-    {
-        hb_log(" - Intel Media SDK software: API %"PRIu16".%"PRIu16" (minimum: %"PRIu16".%"PRIu16")",
-               qsv_software_version.Major, qsv_software_version.Minor,
-               HB_QSV_MINVERSION_MAJOR,    HB_QSV_MINVERSION_MINOR);
-    }
     if (hb_qsv_available())
     {
+        // also print the details
+        if (qsv_hardware_version.Version)
+        {
+            hb_log(" - Intel Media SDK hardware: API %"PRIu16".%"PRIu16" (minimum: %"PRIu16".%"PRIu16")",
+                   qsv_hardware_version.Major, qsv_hardware_version.Minor,
+                   HB_QSV_MINVERSION_MAJOR,    HB_QSV_MINVERSION_MINOR);
+        }
+        
+        if (qsv_software_version.Version)
+        {
+            hb_log(" - Intel Media SDK software: API %"PRIu16".%"PRIu16" (minimum: %"PRIu16".%"PRIu16")",
+                   qsv_software_version.Major, qsv_software_version.Minor,
+                   HB_QSV_MINVERSION_MAJOR,    HB_QSV_MINVERSION_MINOR);
+        }
+    
         if (hb_qsv_info_avc != NULL && hb_qsv_info_avc->available)
         {
             hb_log(" - H.264 encoder: yes");