Skip to content

Commit 56b1c7c

Browse files
TuaansLeedanhle0711
authored andcommitted
QSV: cast width*height to uint32_t to fix sign-compare warning (Fixes #10200)
1 parent 8441c04 commit 56b1c7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/obs-qsv11/QSV_Encoder_Internal.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ mfxStatus QSV_Encoder_Internal::InitParams(qsv_param_t *pParams, enum qsv_codec
347347

348348
constexpr uint32_t pixelcount_4k = 3840 * 2160;
349349
/* If size is 4K+, set tile columns per frame to 2. */
350-
if (codec == QSV_CODEC_AV1 && (pParams->nWidth * pParams->nHeight) >= pixelcount_4k) {
350+
if (codec == QSV_CODEC_AV1 && static_cast<uint32_t>(pParams->nWidth * pParams->nHeight) >= pixelcount_4k) {
351351
memset(&m_ExtAv1TileParam, 0, sizeof(m_ExtAv1TileParam));
352352
m_ExtAv1TileParam.Header.BufferId = MFX_EXTBUFF_AV1_TILE_PARAM;
353353
m_ExtAv1TileParam.Header.BufferSz = sizeof(m_ExtAv1TileParam);

0 commit comments

Comments
 (0)