]> granicus.if.org Git - handbrake/commitdiff
qsv: fix building with qsv disabled
authorJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 11 Jan 2017 21:52:14 +0000 (14:52 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 11 Jan 2017 21:54:16 +0000 (14:54 -0700)
(cherry picked from commit 3f1b45f43c9921810d6a1ef2e3117b6a52632f64)

libhb/qsv_common.c
libhb/qsv_common.h

index a54a40654b0e75916104b2343459bfb144fd664b..011c94e10828931eb3bc22e2773e72e76b31ee9b 100644 (file)
@@ -2150,4 +2150,11 @@ void hb_qsv_force_workarounds()
 #undef FORCE_WORKAROUNDS
 }
 
+#else
+
+int hb_qsv_available()
+{
+    return 0;
+}
+
 #endif // USE_QSV
index 50f27487505dfa9ab86aff9b99f4c9a5cc00e13c..d59cdfd3c7b0aa0289fdf020dbb44ca6dd7fc6bf 100644 (file)
 #ifndef HB_QSV_COMMON_H
 #define HB_QSV_COMMON_H
 
+int            hb_qsv_available();
+
+#ifdef USE_QSV
+
 #include "mfx/mfxvideo.h"
 #include "mfx/mfxplugin.h"
 #include "libavcodec/avcodec.h"
@@ -64,7 +68,6 @@ typedef struct hb_qsv_info_s
 } hb_qsv_info_t;
 
 /* Intel Quick Sync Video utilities */
-int            hb_qsv_available();
 int            hb_qsv_video_encoder_is_enabled(int encoder);
 int            hb_qsv_audio_encoder_is_enabled(int encoder);
 int            hb_qsv_info_init();
@@ -188,4 +191,5 @@ const char* hb_qsv_impl_get_name(int impl);
 
 void hb_qsv_force_workarounds(); // for developers only
 
-#endif
+#endif // USE_QSV
+#endif // HB_QSV_COMMON_H