mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
test_codec: Align the codec buffer to pointer size, since tlsf wants that. Fixes a crash when running tremor in test_codec on 64 bit sim. (The tlsf init bailed out but tremor doesn't check the return and went on to alloc memory anyway)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28365 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
77b3529246
commit
60c640b549
1 changed files with 3 additions and 0 deletions
|
@ -803,6 +803,9 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
dspbuffer = wavbuffer + buffer_size / 2;
|
||||
|
||||
codec_mallocbuf = rb->plugin_get_audio_buffer(&audiosize);
|
||||
/* Align codec_mallocbuf to pointer size, tlsf wants that */
|
||||
codec_mallocbuf = (void*)(((intptr_t)codec_mallocbuf +
|
||||
sizeof(intptr_t)-1) & ~(sizeof(intptr_t)-1));
|
||||
audiobuf = SKIPBYTES(codec_mallocbuf, CODEC_SIZE);
|
||||
audiosize -= CODEC_SIZE;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue