[Scummvm-cvs-logs] SF.net SVN: scummvm:[52874] scummvm/branches/branch-1-2-0/backends/platform /psp/mp3.cpp
bluddy at users.sourceforge.net
bluddy at users.sourceforge.net
Fri Sep 24 11:06:27 CEST 2010
Revision: 52874
http://scummvm.svn.sourceforge.net/scummvm/?rev=52874&view=rev
Author: bluddy
Date: 2010-09-24 09:06:27 +0000 (Fri, 24 Sep 2010)
Log Message:
-----------
PSP: backported from trunk. 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/branches/branch-1-2-0/backends/platform/psp/mp3.cpp
Modified: scummvm/branches/branch-1-2-0/backends/platform/psp/mp3.cpp
===================================================================
--- scummvm/branches/branch-1-2-0/backends/platform/psp/mp3.cpp 2010-09-24 09:05:32 UTC (rev 52873)
+++ scummvm/branches/branch-1-2-0/backends/platform/psp/mp3.cpp 2010-09-24 09:06:27 UTC (rev 52874)
@@ -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