From 38eff9af5c032bf12f89d6e94df05f65eef51afc Mon Sep 17 00:00:00 2001 From: Wei Jia Date: Mon, 17 Aug 2015 19:07:48 -0700 Subject: SoftAVCEncoder: fix mismatched type for comparison. Bug: 20674674 Change-Id: Iace5b8c882339b3a9d2e706375255aeeeb0532fe --- media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp index 523e785..e3fdc89 100644 --- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp +++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp @@ -259,7 +259,7 @@ OMX_ERRORTYPE SoftAVCEncoder::initEncParams() { int32_t nMacroBlocks = ((((mVideoWidth + 15) >> 4) << 4) * (((mVideoHeight + 15) >> 4) << 4)) >> 8; CHECK(mSliceGroup == NULL); - if (nMacroBlocks > SIZE_MAX / sizeof(uint32_t)) { + if ((size_t)nMacroBlocks > SIZE_MAX / sizeof(uint32_t)) { ALOGE("requested memory size is too big."); return OMX_ErrorUndefined; } -- cgit v1.1