summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2010-08-23 20:09:58 +0000
committerBertrik Sikken <bertrik@sikken.nl>2010-08-23 20:09:58 +0000
commite70bc182cf86799e1e5fdc5ca7a29b74a860d864 (patch)
tree63af7fa2d41156e5feecf6d8ff3e45848060a822 /apps/codecs
parent8d5f159687b6abf3b5ad6b1681701a1b80423d92 (diff)
downloadrockbox-e70bc182cf86799e1e5fdc5ca7a29b74a860d864.zip
rockbox-e70bc182cf86799e1e5fdc5ca7a29b74a860d864.tar.gz
rockbox-e70bc182cf86799e1e5fdc5ca7a29b74a860d864.tar.bz2
rockbox-e70bc182cf86799e1e5fdc5ca7a29b74a860d864.tar.xz
Reinitialise ogg_malloc system on each track change with the vorbis codec - part of FS #11533 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27866 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/vorbis.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/codecs/vorbis.c b/apps/codecs/vorbis.c
index 831021f..7435434 100644
--- a/apps/codecs/vorbis.c
+++ b/apps/codecs/vorbis.c
@@ -127,8 +127,6 @@ enum codec_status codec_main(void)
goto exit;
}
- ogg_malloc_init();
-
#if defined(CPU_ARM) || defined(CPU_COLDFIRE) || defined(CPU_MIPS)
if (setjmp(rb_jump_buf) != 0) {
/* malloc failed; skip to next track */
@@ -138,6 +136,8 @@ enum codec_status codec_main(void)
#endif
next_track:
+ ogg_malloc_init();
+
while (!*ci->taginfo_ready && !ci->stop_codec)
ci->sleep(1);
@@ -244,6 +244,7 @@ done:
DEBUGF("Vorbis: Memory max: %u\n", get_max_size(buf));
}
#endif
+ ogg_malloc_destroy();
if (ci->request_next_track()) {
/* Clean things up for the next track */
@@ -256,6 +257,5 @@ done:
}
exit:
- ogg_malloc_destroy();
return error;
}