[Datatype-cvs] mp3/fileformat mp3ff.cpp,1.58.2.15,1.58.2.16

[Datatype-cvs] mp3/fileformat mp3ff.cpp,1.58.2.15,1.58.2.16

ping at helixcommunity.org ping at helixcommunity.org
Wed Sep 29 15:24:13 PST 2010


Update of /cvsroot/datatype/mp3/fileformat
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv25026

Modified Files:
      Tag: hxclient_3_1_0_atlas
	mp3ff.cpp 
Log Message:
We fail to playback some MP3 content because our MP3 file format misidentified MP3 as MPEG and issued AU request. Such misidentification is caused by not well formed ID3 tag.

To fix this, we will skip the validation if we detect the presence of ID3 tag because ID3 tag only exists in MP3 file.

This fixes internal bug: "Bug 266264: RealPlayer is unable to play .mp3 track"



Index: mp3ff.cpp
===================================================================
RCS file: /cvsroot/datatype/mp3/fileformat/mp3ff.cpp,v
retrieving revision 1.58.2.15
retrieving revision 1.58.2.16
diff -u -d -r1.58.2.15 -r1.58.2.16
--- mp3ff.cpp	26 May 2010 02:10:46 -0000	1.58.2.15
+++ mp3ff.cpp	29 Sep 2010 23:24:10 -0000	1.58.2.16
@@ -231,6 +231,7 @@
       m_bFirstMeta(FALSE),
       m_bFileSizeChanged(FALSE),
       m_bFileDurationChanged(FALSE),
+      m_bValidateMP3Required(TRUE),
       m_pCreatePacketFunction(NULL),
       m_ulNewReadSize(0)
 {
@@ -2606,6 +2607,10 @@
     // Check for mp3 streams with headers
     else if (m_pMp3Fmt->CheckForHeaders(pBuffer, dwSize, lHeaderSize))
     {
+        // We positively identified this is MP3 because of the presence of ID3 tag
+        // Therefore, no need to conduct further validation later on.
+        m_bValidateMP3Required = FALSE;
+
         // Handle multiple Id3v2 tags
         m_ulFileOffset += lHeaderSize;
         m_ulBytesRead = m_ulFileOffset;
@@ -2660,20 +2665,23 @@
         nBytesInStream = dwSize;
 
     {
-        // Is this actually an mpeg video or system stream?
-        INT32 nStartCode = GetStartCode(&pBitStream, nBytesInStream);
-
-        switch (nStartCode)
+        if (m_bValidateMP3Required)
         {
-           case PACK_HEADER:
-           case SEQ_START_CODE:
-           case SYSTEM_HEADER:
-           case GROUP_START_CODE:
-           case VIDEO_PACKET:
-           case AUDIO_PACKET:
+            // Is this actually an mpeg video or system stream?
+            INT32 nStartCode = GetStartCode(&pBitStream, nBytesInStream);
 
-               hr = HXR_REQUEST_UPGRADE;
-               return (UINT16)-1;
+            switch (nStartCode)
+            {
+               case PACK_HEADER:
+               case SEQ_START_CODE:
+               case SYSTEM_HEADER:
+               case GROUP_START_CODE:
+               case VIDEO_PACKET:
+               case AUDIO_PACKET:
+
+                   hr = HXR_REQUEST_UPGRADE;
+                   return (UINT16)-1;
+            }
         }
     }
 




More information about the Datatype-cvs mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.