]> granicus.if.org Git - handbrake/commitdiff
fix to prevent lazy compiler assumption and avoid full computation
authorMax Dmytrychenko <maxim.d33@gmail.com>
Sun, 27 Sep 2015 13:57:53 +0000 (15:57 +0200)
committerMax Dmytrychenko <maxim.d33@gmail.com>
Sun, 27 Sep 2015 13:57:53 +0000 (15:57 +0200)
libhb/qsv_common.c

index c50be89010b20d7754116b4b613e9563685d1ec2..075aada0de1ac156a2f9c33a1fa38adc410979be 100644 (file)
@@ -144,8 +144,9 @@ static int qsv_implementation_is_hardware(mfxIMPL implementation)
 
 int hb_qsv_available()
 {
-    return (hb_qsv_video_encoder_is_enabled(HB_VCODEC_QSV_H264) ? HB_VCODEC_QSV_H264 : 0 |
-            hb_qsv_video_encoder_is_enabled(HB_VCODEC_QSV_H265) ? HB_VCODEC_QSV_H265 : 0);
+    int is_qsv_available =  hb_qsv_video_encoder_is_enabled(HB_VCODEC_QSV_H264) ? HB_VCODEC_QSV_H264 : 0;
+    is_qsv_available     |= hb_qsv_video_encoder_is_enabled(HB_VCODEC_QSV_H265) ? HB_VCODEC_QSV_H265 : 0;
+    return is_qsv_available;
 }
 
 int hb_qsv_video_encoder_is_enabled(int encoder)