forked from len0rd/rockbox
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
This commit is contained in:
parent
8d5f159687
commit
e70bc182cf
1 changed files with 3 additions and 3 deletions
|
|
@ -127,8 +127,6 @@ enum codec_status codec_main(void)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ogg_malloc_init();
|
|
||||||
|
|
||||||
#if defined(CPU_ARM) || defined(CPU_COLDFIRE) || defined(CPU_MIPS)
|
#if defined(CPU_ARM) || defined(CPU_COLDFIRE) || defined(CPU_MIPS)
|
||||||
if (setjmp(rb_jump_buf) != 0) {
|
if (setjmp(rb_jump_buf) != 0) {
|
||||||
/* malloc failed; skip to next track */
|
/* malloc failed; skip to next track */
|
||||||
|
|
@ -138,6 +136,8 @@ enum codec_status codec_main(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
next_track:
|
next_track:
|
||||||
|
ogg_malloc_init();
|
||||||
|
|
||||||
while (!*ci->taginfo_ready && !ci->stop_codec)
|
while (!*ci->taginfo_ready && !ci->stop_codec)
|
||||||
ci->sleep(1);
|
ci->sleep(1);
|
||||||
|
|
||||||
|
|
@ -244,6 +244,7 @@ done:
|
||||||
DEBUGF("Vorbis: Memory max: %u\n", get_max_size(buf));
|
DEBUGF("Vorbis: Memory max: %u\n", get_max_size(buf));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
ogg_malloc_destroy();
|
||||||
|
|
||||||
if (ci->request_next_track()) {
|
if (ci->request_next_track()) {
|
||||||
/* Clean things up for the next track */
|
/* Clean things up for the next track */
|
||||||
|
|
@ -256,6 +257,5 @@ done:
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
ogg_malloc_destroy();
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue