summaryrefslogtreecommitdiffstats
path: root/libhb/qsv_common.c
diff options
context:
space:
mode:
authorMax Dmytrychenko <[email protected]>2015-09-27 15:57:53 +0200
committerMax Dmytrychenko <[email protected]>2015-09-27 15:57:53 +0200
commit32edfb239d195fb68e6d56b478197db978e8182a (patch)
treef929eae74fcaaba53ffb040ac324ebaffed2fa57 /libhb/qsv_common.c
parent3fead98a28ac0796831face293d519417abd3bfe (diff)
fix to prevent lazy compiler assumption and avoid full computation
Diffstat (limited to 'libhb/qsv_common.c')
-rw-r--r--libhb/qsv_common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c
index c50be8901..075aada0d 100644
--- a/libhb/qsv_common.c
+++ b/libhb/qsv_common.c
@@ -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)