summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiyong.min <jiyong.min@samsung.com>2020-02-07 11:17:48 +0900
committerjiyong.min <jiyong.min@samsung.com>2020-02-07 11:23:45 +0900
commit4f27f1c5bf1363dfc55f0801969d5d6c0f423c14 (patch)
treeb4be5665cf74e5f4812fe4c128995686365e8fff
parent24d5d2793af02fd85bc2e298bb0c9c6cc11b3bd2 (diff)
downloadlibmm-fileinfo-4f27f1c5bf1363dfc55f0801969d5d6c0f423c14.tar.gz
libmm-fileinfo-4f27f1c5bf1363dfc55f0801969d5d6c0f423c14.tar.bz2
libmm-fileinfo-4f27f1c5bf1363dfc55f0801969d5d6c0f423c14.zip
Change-Id: I13287f489082df64e03fb06208b60b588a3f4d5c
-rwxr-xr-xformats/ffmpeg/include/mm_file_format_audio.h2
-rw-r--r--formats/ffmpeg/mm_file_format_mp3.c6
-rwxr-xr-xutils/include/mm_file_utils.h1
3 files changed, 3 insertions, 6 deletions
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