[Datatype-cvs] mp3/fileformat mp3ff.cpp, 1.58.2.15.4.1, 1.58.2.15.4.2

[Datatype-cvs] mp3/fileformat mp3ff.cpp, 1.58.2.15.4.1, 1.58.2.15.4.2

ching_li at helixcommunity.org ching_li at helixcommunity.org
Wed Sep 29 18:26:44 PST 2010


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

Modified Files:
      Tag: hxclient_3_6_2_atlas
	mp3ff.cpp 
Log Message:
Fix Bug #10679: The bug happens when there are a lot of junk information in file header, so that the player can not find the sync word in a block of buffered data, then it causes a INVALID_FILE error. I modified the CRnMp3Fmt::InitStream_n function to ignore all unknown data until found a valid frame. I think it would not bring other problems except to waste a few time on type checking.


Index: mp3ff.cpp
===================================================================
RCS file: /cvsroot/datatype/mp3/fileformat/mp3ff.cpp,v
retrieving revision 1.58.2.15.4.1
retrieving revision 1.58.2.15.4.2
diff -u -d -r1.58.2.15.4.1 -r1.58.2.15.4.2
--- mp3ff.cpp	29 Jul 2010 07:54:03 -0000	1.58.2.15.4.1
+++ mp3ff.cpp	30 Sep 2010 02:26:41 -0000	1.58.2.15.4.2
@@ -2947,8 +2947,10 @@
     }
     else
     {
-        hr = HXR_INVALID_FILE;
-        return (UINT16)-1;
+        // Ignore unknown data
+        m_ulFileOffset += dwSize;
+        m_ulBytesRead = m_ulFileOffset;
+        return 0;
     }
     }
 }




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.