diff options
-rw-r--r-- | src/Common/Utils/src/MediaUtils.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Common/Utils/src/MediaUtils.cpp b/src/Common/Utils/src/MediaUtils.cpp index 5d868a6..d742563 100644 --- a/src/Common/Utils/src/MediaUtils.cpp +++ b/src/Common/Utils/src/MediaUtils.cpp @@ -228,6 +228,7 @@ long long 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()); @@ -256,7 +257,7 @@ long long 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) { |