From: jiyong.min Date: Fri, 7 Feb 2020 02:17:48 +0000 (+0900) Subject: Remove unused code and apply coding rule X-Git-Tag: accepted/tizen/unified/20200210.131829^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f27f1c5bf1363dfc55f0801969d5d6c0f423c14;p=platform%2Fcore%2Fmultimedia%2Flibmm-fileinfo.git Remove unused code and apply coding rule Change-Id: I13287f489082df64e03fb06208b60b588a3f4d5c --- diff --git a/formats/ffmpeg/include/mm_file_format_audio.h b/formats/ffmpeg/include/mm_file_format_audio.h index fb838f7..11b08f0 100755 --- a/formats/ffmpeg/include/mm_file_format_audio.h +++ b/formats/ffmpeg/include/mm_file_format_audio.h @@ -107,8 +107,6 @@ #define MASK_PADDING 0x02 /* 00000010 */ #define _AV_MP3_HEADER_POSITION_MAX (50*1024) /* mp3 header should be exist inside this size */ -#define AV_MP3_HEADER_READ_MAX 200000 /* mp3 header should be exist inside this size */ -#define AV_WM_LOCALCODE_SIZE_MAX 2 /* * Xing Header Information diff --git a/formats/ffmpeg/mm_file_format_mp3.c b/formats/ffmpeg/mm_file_format_mp3.c index 144dce1..db1408b 100644 --- a/formats/ffmpeg/mm_file_format_mp3.c +++ b/formats/ffmpeg/mm_file_format_mp3.c @@ -1157,7 +1157,7 @@ static int mmf_file_mp3_get_stream_info(char *filename, AvFileContentInfo *pInfo debug_fenter(RELEASE); - if (pInfo == NULL || filename == NULL) + if (!pInfo || !filename) return -1; memset(pInfo, 0x00, sizeof(AvFileContentInfo)); @@ -1202,6 +1202,7 @@ static int mmf_file_mp3_get_stream_info(char *filename, AvFileContentInfo *pInfo /* if taglen is invlaid, check whole file to get MP3 info */ if (mmfile_seek(hFile, 0L, SEEK_SET) < 0) goto EXCEPTION; + pInfo->tagV2Info.tagLen = 0; bufLen = pInfo->fileLen; } @@ -1209,9 +1210,8 @@ static int mmf_file_mp3_get_stream_info(char *filename, AvFileContentInfo *pInfo debug_msg(RELEASE, "buf size(%lu)\n", bufLen); buf = mmfile_malloc(bufLen); - if (!buf) { + if (!buf) goto EXCEPTION; - } if (mmfile_read(hFile, buf, bufLen) != (int)bufLen) { mmfile_free(buf); diff --git a/utils/include/mm_file_utils.h b/utils/include/mm_file_utils.h index a590eba..364d080 100755 --- a/utils/include/mm_file_utils.h +++ b/utils/include/mm_file_utils.h @@ -281,7 +281,6 @@ inline static int __AvMemstr(unsigned char *mem, unsigned char *str, int str_len #define NEWLINE_OF_UTF16_R(x) (((x))[0] == 0xFE && ((x))[1] == 0xFF && ((x))[2] == 0x00 && ((x))[3] == 0x00) -#define AV_WM_LOCALCODE_SIZE_MAX 2 #define MP3_TAGv2_HEADER_LEN 10 #define MP3_TAGv2_23_TXT_HEADER_LEN 10 #define MP3_TAGv2_22_TXT_HEADER_LEN 6