From 2a8aa598cde2902f82138a9cb75e65beab6a4b95 Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Wed, 13 Nov 2019 12:22:07 +0900 Subject: [PATCH] Remove unused variables - descriptionLen - pDescription - pRating - bTagVer2Found - bGenreUTF16 Change-Id: Id0ae4c97533d7a466686eacaf35af919d157e9f1 --- formats/ffmpeg/mm_file_format_aac.c | 1 - formats/ffmpeg/mm_file_format_mp3.c | 1 - utils/include/mm_file_utils.h | 11 ----------- utils/mm_file_util_tag.c | 22 ++++++++-------------- 4 files changed, 8 insertions(+), 27 deletions(-) diff --git a/formats/ffmpeg/mm_file_format_aac.c b/formats/ffmpeg/mm_file_format_aac.c index a9bcab8..41a3e26 100644 --- a/formats/ffmpeg/mm_file_format_aac.c +++ b/formats/ffmpeg/mm_file_format_aac.c @@ -256,7 +256,6 @@ int _parse_id3_tag(tMMFILE_AAC_HANDLE *pData) pData->tagInfo.tracknum = hTag->pTrackNum; pData->tagInfo.composer = hTag->pComposer; pData->tagInfo.classification = hTag->pContentGroup; - pData->tagInfo.rating = hTag->pRating; pData->tagInfo.recordDate = hTag->pRecDate; pData->tagInfo.conductor = hTag->pConductor; pData->tagInfo.artworkMime = hTag->imageInfo.imageMIMEType; diff --git a/formats/ffmpeg/mm_file_format_mp3.c b/formats/ffmpeg/mm_file_format_mp3.c index 42ffc00..d5eb6c0 100644 --- a/formats/ffmpeg/mm_file_format_mp3.c +++ b/formats/ffmpeg/mm_file_format_mp3.c @@ -1233,7 +1233,6 @@ static int mmf_file_mp3_get_infomation(char *filename, AvFileContentInfo *pInfo) debug_msg(RELEASE, "Author : %s\n", pInfo->pAuthor); debug_msg(RELEASE, "Copyright : %s\n", pInfo->pCopyright); debug_msg(RELEASE, "Comment : %s\n", pInfo->pComment); - debug_msg(RELEASE, "Rating : %s\n", pInfo->pRating); debug_msg(RELEASE, "RecDate : %s\n", pInfo->pRecDate); debug_msg(RELEASE, "PartOfASet : %s\n", pInfo->pPartOfASet); debug_msg(RELEASE, "Encoded by : %s\n", pInfo->pEncBy); diff --git a/utils/include/mm_file_utils.h b/utils/include/mm_file_utils.h index 0c8f882..48935e5 100755 --- a/utils/include/mm_file_utils.h +++ b/utils/include/mm_file_utils.h @@ -387,8 +387,6 @@ typedef struct { int tagLen; char tagVersion; - bool bTagVer2Found; - bool bTitleMarked; bool bArtistMarked; bool bAlbumMarked; @@ -411,9 +409,6 @@ typedef struct { bool bSyncLyricsMarked; bool bConductorMarked; - - bool bGenreUTF16; - } AvTagVer2AdditionalData; @@ -422,7 +417,6 @@ typedef struct { int artistLen; int authorLen; int copyrightLen; - int descriptionLen; int commentLen; int ratingLen; int albumLen; @@ -452,7 +446,6 @@ typedef struct { unsigned int bitRate; unsigned int sampleRate; unsigned int channels; -/* unsigned long creationTime; */ long long duration; /* for mp3 Info */ @@ -475,9 +468,7 @@ typedef struct { char *pArtist; /*Lead performer(s)/Soloist(s), */ char *pAuthor; /*Author */ char *pCopyright; - char *pDescription; char *pComment; - char *pRating; char *pAlbum; /*Album/Movie/ */ char *pAlbum_Artist; char *pYear; @@ -529,9 +520,7 @@ inline static void mm_file_free_AvFileContentInfo(AvFileContentInfo *pInfo) mmfile_free(pInfo->pArtist); mmfile_free(pInfo->pAuthor); mmfile_free(pInfo->pCopyright); - mmfile_free(pInfo->pDescription); mmfile_free(pInfo->pComment); - mmfile_free(pInfo->pRating); mmfile_free(pInfo->pAlbum); mmfile_free(pInfo->pAlbum_Artist); mmfile_free(pInfo->pYear); diff --git a/utils/mm_file_util_tag.c b/utils/mm_file_util_tag.c index 2e20671..e28f68b 100644 --- a/utils/mm_file_util_tag.c +++ b/utils/mm_file_util_tag.c @@ -2517,7 +2517,6 @@ static void init_content_info(AvFileContentInfo *pInfo) pInfo->tagV2Info.bUnsyncLyricsMarked = false; pInfo->tagV2Info.bSyncLyricsMarked = false; pInfo->tagV2Info.bConductorMarked = false; - pInfo->tagV2Info.bGenreUTF16 = false; pInfo->imageInfo.bURLInfo = false; pInfo->imageInfo.pImageBuf = NULL; @@ -3852,21 +3851,16 @@ void mm_file_id3tag_restore_content_info(AvFileContentInfo *pInfo) debug_msg(RELEASE, "Genre was not Found.\n"); } } else if (pInfo->tagV2Info.bGenreMarked == true) { - if (pInfo->genreLen && pInfo->tagV2Info.bGenreUTF16) { - pInfo->pGenre[pInfo->genreLen + 1] = '\0'; - mpegAudioGenre = mmfile_malloc(sizeof(char) * (pInfo->genreLen * AV_WM_LOCALCODE_SIZE_MAX + 1)); - } else { - debug_msg(RELEASE, "pInfo->genreLen size is Zero Or not UTF16 code! genreLen[%d] genre[%s]\n", pInfo->genreLen, pInfo->pGenre); + debug_msg(RELEASE, "pInfo->genreLen size is Zero Or not UTF16 code! genreLen[%d] genre[%s]\n", pInfo->genreLen, pInfo->pGenre); - if (pInfo->pGenre) { - pInfo->genreLen = strlen(pInfo->pGenre); - mpegAudioGenre = mmfile_malloc(sizeof(char) * (pInfo->genreLen + 1)); - if (mpegAudioGenre != NULL) { - SAFE_STRLCPY(mpegAudioGenre, pInfo->pGenre, pInfo->genreLen + 1); - } - } else { - pInfo->genreLen = 0; + if (pInfo->pGenre) { + pInfo->genreLen = strlen(pInfo->pGenre); + mpegAudioGenre = mmfile_malloc(sizeof(char) * (pInfo->genreLen + 1)); + if (mpegAudioGenre != NULL) { + SAFE_STRLCPY(mpegAudioGenre, pInfo->pGenre, pInfo->genreLen + 1); } + } else { + pInfo->genreLen = 0; } mmfile_free(pInfo->pGenre); -- 2.7.4