diff options
author | Nils Wallménius <nils@rockbox.org> | 2010-10-27 15:07:05 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2010-10-27 15:07:05 +0000 |
commit | 60c640b5493ffac88a23e05f1a819dff27ec2de3 (patch) | |
tree | 65ab97a84cfb14d05af6e5afab5f3439bf01b710 | |
parent | 77b3529246da2107afd75f8aab4d652441035bf0 (diff) |
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
-rw-r--r-- | apps/plugins/test_codec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c index d581d74f8e..91b83b5343 100644 --- a/apps/plugins/test_codec.c +++ b/apps/plugins/test_codec.c @@ -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; |