From: chengyj1985 Date: Fri, 16 Sep 2022 03:52:08 +0000 (+0800) Subject: Use unsigned long, it's 8 bytes in 64bit system. X-Git-Tag: accepted/tizen/7.0/unified/hotfix/20221116.105419^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_7.0_unified_hotfix;p=platform%2Fcore%2Fmultimedia%2Flibmm-fileinfo.git Use unsigned long, it's 8 bytes in 64bit system. Change-Id: I64bacc0594a2f179f5e8d9758585c2ba172b8fb4 --- diff --git a/utils/mm_file_util_validity.c b/utils/mm_file_util_validity.c index 11c8e9e..e181146 100755 --- a/utils/mm_file_util_validity.c +++ b/utils/mm_file_util_validity.c @@ -691,7 +691,7 @@ int MMFileFormatIsValidMatroska(MMFileIOHandle *pFileIO, const char *mmfileuri, unsigned char buffer[_MMFILE_MKV_READ_BUFFER_LENGTH] = {0, }; int ret = 0; int len_mask = 0x80; - unsigned int size = 1, n = 1, total = 0; + unsigned long size = 1, n = 1, total = 0; //char probe_data[] = { 'm', 'a', 't', 'r', 'o', 's', 'k', 'a' }; /*support webm, add probe data*/ const char * probe_data[2] = { "matroska", "webm" }; @@ -714,7 +714,7 @@ int MMFileFormatIsValidMatroska(MMFileIOHandle *pFileIO, const char *mmfileuri, /* length of header */ total = buffer[4]; - debug_msg(RELEASE, "Initial total header size = [0x%x]", total); + debug_msg(RELEASE, "Initial total header size = [%lu]", total); while (size <= 8 && !(total & len_mask)) { debug_msg(DEBUG, "This case can not be handled yet...."); @@ -722,7 +722,7 @@ int MMFileFormatIsValidMatroska(MMFileIOHandle *pFileIO, const char *mmfileuri, len_mask >>= 1; } - debug_msg(RELEASE, "Final total header size = [%d]", total); + debug_msg(RELEASE, "Final total header size = [%lu]", total); if (size > 8) { debug_msg(DEBUG, "This case can not be handled yet...."); @@ -742,7 +742,7 @@ int MMFileFormatIsValidMatroska(MMFileIOHandle *pFileIO, const char *mmfileuri, /*compare two kinds of probe data*/ for (int i = 0; i < 2; i++) { - unsigned int probelen = strlen(probe_data[i]); + unsigned long probelen = strlen(probe_data[i]); if (total < probelen) continue; for (n = 4 + size ; n <= 4 + size + total - probelen; n++) { @@ -1112,7 +1112,7 @@ static int _MMFileIsMPEGTSHeader(MMFileIOHandle *fp) { unsigned char buffer[TS_MAX_PACKET_SIZE] = {0, }; unsigned char *s = NULL; - unsigned int startoffset = 0; + unsigned long startoffset = 0; mmfile_seek(fp, 0, MMFILE_SEEK_SET); mmfile_read(fp, buffer, TS_MAX_PACKET_SIZE); @@ -1139,7 +1139,7 @@ static int _MMFileIsMPEGTSHeader(MMFileIOHandle *fp) static int _MMFileIsMP3Header(void *header) { - unsigned long head = 0; + unsigned int head = 0; unsigned char *headc = header; unsigned int bitrate, layer, length/*, mode*/; unsigned int coef, samplerate, version/*, channels*/;