From bab570e71763960d41236927d835abb5db7915e3 Mon Sep 17 00:00:00 2001 From: hj kim Date: Wed, 5 Feb 2020 15:46:02 +0900 Subject: [PATCH] Remove useless parameter v2numOfFrames Change-Id: I6967a9637c370a884247104b93a89ff8d2272b73 --- utils/mm_file_util_tag.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/utils/mm_file_util_tag.c b/utils/mm_file_util_tag.c index e55c451..b605ce5 100644 --- a/utils/mm_file_util_tag.c +++ b/utils/mm_file_util_tag.c @@ -2969,7 +2969,6 @@ bool mm_file_id3tag_parse_v222(AvFileContentInfo *pInfo, unsigned char *buffer) unsigned long taglen = 0; unsigned long needToloopv2taglen; unsigned long oneFrameLen = 0; - unsigned long v2numOfFrames = 0; unsigned long curPos = 0; char CompTmp[4]; unsigned char *pExtContent = NULL; @@ -2992,7 +2991,6 @@ bool mm_file_id3tag_parse_v222(AvFileContentInfo *pInfo, unsigned char *buffer) debug_msg(RELEASE, "ID3tag v222--------------------------------------------------------------\n"); if (needToloopv2taglen - MP3_TAGv2_22_TXT_HEADER_LEN > MP3_TAGv2_22_TXT_HEADER_LEN) { - v2numOfFrames = 1; while (needToloopv2taglen > MP3_TAGv2_22_TXT_HEADER_LEN) { if ((buffer[curPos] < '0' || buffer[curPos] > 'Z') || (buffer[curPos + 1] < '0' || buffer[curPos + 1] > 'Z') || (buffer[curPos + 2] < '0' || buffer[curPos + 2] > 'Z')) @@ -3149,11 +3147,11 @@ bool mm_file_id3tag_parse_v222(AvFileContentInfo *pInfo, unsigned char *buffer) mmfile_free(pExtContent); memset(CompTmp, 0, 4); - if (curPos < taglen) { + if (curPos < taglen) needToloopv2taglen -= oneFrameLen; - v2numOfFrames++; - } else + else needToloopv2taglen = MP3_TAGv2_22_TXT_HEADER_LEN; + oneFrameLen = 0; encodingOffSet = 0; realCpyFrameNum = 0; @@ -3276,7 +3274,6 @@ bool mm_file_id3tag_parse_v223(AvFileContentInfo *pInfo, unsigned char *buffer) unsigned long taglen = 0; unsigned long needToloopv2taglen; unsigned long oneFrameLen = 0; - unsigned long v2numOfFrames = 0; unsigned long curPos = 0; char CompTmp[5]; unsigned char *pExtContent = NULL; @@ -3312,7 +3309,6 @@ bool mm_file_id3tag_parse_v223(AvFileContentInfo *pInfo, unsigned char *buffer) } if (needToloopv2taglen - MP3_TAGv2_23_TXT_HEADER_LEN > MP3_TAGv2_23_TXT_HEADER_LEN) { - v2numOfFrames = 1; while (needToloopv2taglen > MP3_TAGv2_23_TXT_HEADER_LEN) { if ((buffer[curPos] < '0' || buffer[curPos] > 'Z') || (buffer[curPos + 1] < '0' || buffer[curPos + 1] > 'Z') || (buffer[curPos + 2] < '0' || buffer[curPos + 2] > 'Z') || (buffer[curPos + 3] < '0' || buffer[curPos + 3] > 'Z')) @@ -3519,11 +3515,11 @@ bool mm_file_id3tag_parse_v223(AvFileContentInfo *pInfo, unsigned char *buffer) mmfile_free(pExtContent); memset(CompTmp, 0, 4); - if (curPos < taglen) { + if (curPos < taglen) needToloopv2taglen -= oneFrameLen; - v2numOfFrames++; - } else + else needToloopv2taglen = MP3_TAGv2_23_TXT_HEADER_LEN; + oneFrameLen = 0; encodingOffSet = 0; realCpyFrameNum = 0; @@ -3548,7 +3544,6 @@ bool mm_file_id3tag_parse_v224(AvFileContentInfo *pInfo, unsigned char *buffer) unsigned long taglen = 0; unsigned long needToloopv2taglen; unsigned long oneFrameLen = 0; - unsigned long v2numOfFrames = 0; unsigned long curPos = 0; char CompTmp[5]; unsigned char *pExtContent = NULL; @@ -3583,7 +3578,6 @@ bool mm_file_id3tag_parse_v224(AvFileContentInfo *pInfo, unsigned char *buffer) } if (needToloopv2taglen - MP3_TAGv2_23_TXT_HEADER_LEN > MP3_TAGv2_23_TXT_HEADER_LEN) { - v2numOfFrames = 1; while (needToloopv2taglen > MP3_TAGv2_23_TXT_HEADER_LEN) { if ((buffer[curPos] < '0' || buffer[curPos] > 'Z') || (buffer[curPos + 1] < '0' || buffer[curPos + 1] > 'Z') || (buffer[curPos + 2] < '0' || buffer[curPos + 2] > 'Z') || (buffer[curPos + 3] < '0' || buffer[curPos + 3] > 'Z')) @@ -3739,10 +3733,9 @@ bool mm_file_id3tag_parse_v224(AvFileContentInfo *pInfo, unsigned char *buffer) mmfile_free(pExtContent); memset(CompTmp, 0, 4); - if (curPos < taglen) { + if (curPos < taglen) needToloopv2taglen -= oneFrameLen; - v2numOfFrames++; - } else + else needToloopv2taglen = MP3_TAGv2_23_TXT_HEADER_LEN; oneFrameLen = 0; -- 2.7.4