[Scummvm-cvs-logs] SF.net SVN: scummvm:[52868] scummvm/trunk/backends/platform/psp/mp3.cpp

bluddy at users.sourceforge.net bluddy at users.sourceforge.net
Thu Sep 23 23:03:20 CEST 2010


Revision: 52868
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52868&view=rev
Author:   bluddy
Date:     2010-09-23 21:03:20 +0000 (Thu, 23 Sep 2010)

Log Message:
-----------
PSP: fix issue in ME MP3 code. Release and init the ME when seeking.

Without this fix, the ME allocates more and more memory with every seek until it can't work.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/psp/mp3.cpp

Modified: scummvm/trunk/backends/platform/psp/mp3.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/mp3.cpp	2010-09-23 20:03:29 UTC (rev 52867)
+++ scummvm/trunk/backends/platform/psp/mp3.cpp	2010-09-23 21:03:20 UTC (rev 52868)
@@ -415,10 +415,13 @@
 	mad_timer_t destination;
 	mad_timer_set(&destination, time / 1000, time % 1000, 1000);
 
+	// Important to release and re-init the ME
+	releaseStreamME();
+	initStreamME();
+	
 	// Check if we need to rewind
 	if (_state != MP3_STATE_READY || mad_timer_compare(destination, _totalTime) < 0) {
 		initStream();
-		initStreamME();
 	}
 
 	// Skip ahead


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list