From d015d4adc72e3bc4490d1895948e9b1a861882e0 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 6 Jan 2017 20:43:05 +0000 Subject: [PATCH] qsv: Fix a crash that can occur in hb_qsv_info_print() when QSV hardware exists in the system but is disabled in the bios. --- libhb/qsv_common.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c index 8042b50b4..3d8e7a275 100644 --- a/libhb/qsv_common.c +++ b/libhb/qsv_common.c @@ -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"); -- 2.40.0