diff options
author | Yotam Barnoy | 2010-09-23 21:03:20 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-09-23 21:03:20 +0000 |
commit | 4807fdb4c70bd21c412914089b493cc190c50fb5 (patch) | |
tree | 5adec81e4d6481123700806701154a6ded800d2a | |
parent | b7911ef0f4342f0d69f9aaf3c9e59f9f7b4ced7b (diff) | |
download | scummvm-rg350-4807fdb4c70bd21c412914089b493cc190c50fb5.tar.gz scummvm-rg350-4807fdb4c70bd21c412914089b493cc190c50fb5.tar.bz2 scummvm-rg350-4807fdb4c70bd21c412914089b493cc190c50fb5.zip |
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.
svn-id: r52868
-rw-r--r-- | backends/platform/psp/mp3.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backends/platform/psp/mp3.cpp b/backends/platform/psp/mp3.cpp index 98e8a0404b..da189c532c 100644 --- a/backends/platform/psp/mp3.cpp +++ b/backends/platform/psp/mp3.cpp @@ -415,10 +415,13 @@ bool Mp3PspStream::seek(const Timestamp &where) { 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 |