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

index 075aada0de1ac156a2f9c33a1fa38adc410979be..bbe9a1fe509a54804240c7daa723219965688815 100644 (file)
@@ -144,9 +144,8 @@ static int qsv_implementation_is_hardware(mfxIMPL implementation)
 
 int hb_qsv_available()
 {
-    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;
+    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 hb_qsv_video_encoder_is_enabled(int encoder)