1. in special case, the lyrics of music content are not displayed 2. Get valid durati...
authorHyunjun Ko <zzoon.ko@samsung.com>
Fri, 29 Mar 2013 08:33:06 +0000 (17:33 +0900)
committerHyunjun Ko <zzoon.ko@samsung.com>
Fri, 29 Mar 2013 08:33:06 +0000 (17:33 +0900)
formats/ffmpeg/mm_file_format_mp3.c
packaging/libmm-fileinfo.spec
utils/mm_file_util_tag.c

index 4dcfb8d..0584f0d 100755 (executable)
@@ -620,6 +620,21 @@ __AvParseXingHeader( AvFileContentInfo* pInfo, unsigned char* buf )
                }
        }
        else
+       if((pInfo->mpegVersion == AV_MPEG_VER_25) && (pInfo->channels == 1))
+       {
+               if (buf[13] =='X') {
+                       if( buf[14] != 'i' ) return false;
+                       if( buf[15] != 'n' ) return false;
+                       if( buf[16] != 'g' ) return false;
+               } else if (buf[13] == 'I') {
+                       if( buf[14] != 'n' ) return false;
+                       if( buf[15] != 'f' ) return false;
+                       if( buf[16] != 'o' ) return false;
+               } else {
+                       return false;
+               }
+       }
+       else
        {
                if (buf[21] =='X') {
                        if( buf[22] != 'i' ) return false;
@@ -645,7 +660,10 @@ __AvParseXingHeader( AvFileContentInfo* pInfo, unsigned char* buf )
                        return false;
                }
        
-               pInfo->sampleRate = data.sampRate;
+               /* Temporary fix code for MPEG 2.5 */
+               if (pInfo->mpegVersion != AV_MPEG_VER_25) {
+                       pInfo->sampleRate = data.sampRate;
+               }
                pInfo->datafileLen = data.bytes;
                pInfo->frameNum = data.frames;
                pInfo->frameSize = (int) ( (float) data.bytes / (float) data.frames )  ;
@@ -1433,6 +1451,8 @@ static int mmf_file_mp3_get_infomation (char *filename, AvFileContentInfo* pInfo
                        frameSamples = MPEG_2_SIZE_LAYER_2_3;
        }
 
+       debug_msg("frameSamples : %d, tempduration : %ld", frameSamples, tempduration);
+
        if(tempduration < (unsigned long long)pInfo->sampleRate)
        {
                tempduration = (tempduration*frameSamples*10)/pInfo->sampleRate;
index bf04cdc..3f47bb9 100755 (executable)
@@ -1,7 +1,7 @@
 Name:      libmm-fileinfo
 Summary:    Media Fileinfo
 Version:    0.6.0
-Release:    19
+Release:    20
 Group:      System/Libraries
 License:    Apache License, Version 2.0
 Source0:    %{name}-%{version}.tar.gz
index fe28fc6..ce40f36 100755 (executable)
@@ -2462,6 +2462,11 @@ bool mm_file_id3tag_parse_v223(AvFileContentInfo* pInfo, unsigned char *buffer)
                                                                //pExtContent[tmp+1] value should't have encoding value
                                                                if(pExtContent[tmp] == 0x00 || pExtContent[tmp] == 0xFF|| pExtContent[tmp] == 0xFE)
                                                                {
+                                                                       if (pExtContent[tmp] == 0x00) {
+                                                                               realCpyFrameNum -= 2;
+                                                                               tmp = 5;
+                                                                       }
+
                                                                        if((IS_ENCODEDBY_UTF16(pExtContent+tmp) || IS_ENCODEDBY_UTF16_R(pExtContent+tmp)) && realCpyFrameNum > 2)
                                                                        {
                                                                                while((NEWLINE_OF_UTF16(pExtContent + tmp) || NEWLINE_OF_UTF16_R(pExtContent + tmp))&& realCpyFrameNum > 4)