Fix stream info extraction bug 74/246874/4
authorMinje Ahn <minje.ahn@samsung.com>
Thu, 5 Nov 2020 00:06:14 +0000 (09:06 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Fri, 6 Nov 2020 03:25:08 +0000 (12:25 +0900)
'headerPos' can be 0 if there is no ID3v2 tag in the mp3 file.

Change-Id: Id9ca894bfc8d9fb21cb74972cc78c3691d03b25e
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
formats/ffmpeg/mm_file_format_mp3.c

index 36166431ead06ad9528512672b09f8b3cc3e311f..e2d48d591511c2a14d7602274c5aa3d8fb63f645 100644 (file)
@@ -734,7 +734,7 @@ static bool __get_tag_info(char *filename, AvFileContentInfo *pInfo)
        else if (pInfo->tagV2Info.tagVersion == 0x03)
                mm_file_id3tag_parse_v223(pInfo, buf);
        else if (pInfo->tagV2Info.tagVersion == 0x04)
-               mm_file_id3tag_parse_v224(pInfo, buf); /* currently 2.4 ver pased by 2.3 routine */
+               mm_file_id3tag_parse_v224(pInfo, buf); /* currently 2.4 ver parsed by 2.3 routine */
        else
                debug_msg(RELEASE, "Invalid tag version(%d)", pInfo->tagV2Info.tagVersion);
 
@@ -841,7 +841,7 @@ static bool __get_stream_info(char *filename, AvFileContentInfo *pInfo)
 
        debug_msg(RELEASE, "ID3 Len[%u] File Len[%lld]", pInfo->tagV2Info.tagLen, pInfo->fileLen);
 
-       if (!__AvGetMp3HeaderInfo(hFile, pInfo) || pInfo->headerPos <= 0)
+       if (!__AvGetMp3HeaderInfo(hFile, pInfo))
                goto EXCEPTION;
 
        if (pInfo->mpegVersion == 1)