From: Nilesh Trimbake Date: Tue, 6 Nov 2018 07:16:19 +0000 (+0530) Subject: Add valid pointer to image_util_decode_run() API X-Git-Tag: submit/tizen/20181106.165056^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F31%2F192531%2F1;p=profile%2Fmobile%2Fapps%2Fnative%2Fmessage.git Add valid pointer to image_util_decode_run() API This patch add valid pointer to image util api. Change-Id: I2fb8103d683a030c83b05720dc3afecea521b7fc --- diff --git a/src/Common/Utils/src/MediaUtils.cpp b/src/Common/Utils/src/MediaUtils.cpp index 8a58e231..68dd5964 100644 --- a/src/Common/Utils/src/MediaUtils.cpp +++ b/src/Common/Utils/src/MediaUtils.cpp @@ -219,6 +219,7 @@ long long MediaUtils::downgradeImageQuality(const std::string &imagePath) unsigned int exifBuffLen = 0; unsigned char *jpegBuff = nullptr; unsigned long long int jpegBuffLen = 0; + unsigned long long int bufferSize = 0; std::ofstream outputFile; exifData = exif_data_new_from_file(imagePath.c_str()); @@ -241,7 +242,7 @@ long long MediaUtils::downgradeImageQuality(const std::string &imagePath) return FileUtils::getFileSize(imagePath); } - res = image_util_decode_run(decode_h, &width, &height, nullptr); + res = image_util_decode_run(decode_h, &width, &height, &bufferSize); image_util_decode_destroy(decode_h); if (res != IMAGE_UTIL_ERROR_NONE) return FileUtils::getFileSize(imagePath);