diff options
author | Thomas Martitz <kugel@rockbox.org> | 2011-10-09 12:30:37 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2011-10-09 12:30:37 +0000 |
commit | 889690c0f60a2ce2cdfd985895d0484c78083df1 (patch) | |
tree | 2b40d92a48d777319584ba5f161ce844970d6f3d /firmware/buflib.c | |
parent | aed39dbbafc2f1cacfdce4382f22b06ab0224aae (diff) | |
download | rockbox-889690c0f60a2ce2cdfd985895d0484c78083df1.tar.gz rockbox-889690c0f60a2ce2cdfd985895d0484c78083df1.zip |
Fix audio_get_buffer() implementation on hwcodec, to be similar to the swcodec one. Should make hwcodec bood again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30737 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/buflib.c')
-rw-r--r-- | firmware/buflib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/buflib.c b/firmware/buflib.c index d82acd77d3..4ffd6cfce3 100644 --- a/firmware/buflib.c +++ b/firmware/buflib.c | |||
@@ -628,7 +628,11 @@ buflib_alloc_maximum(struct buflib_context* ctx, const char* name, size_t *size, | |||
628 | { | 628 | { |
629 | /* limit name to 16 since that's what buflib_available() accounts for it */ | 629 | /* limit name to 16 since that's what buflib_available() accounts for it */ |
630 | char buf[16]; | 630 | char buf[16]; |
631 | |||
631 | *size = buflib_available(ctx); | 632 | *size = buflib_available(ctx); |
633 | if (*size <= 0) /* OOM */ | ||
634 | return -1; | ||
635 | |||
632 | strlcpy(buf, name, sizeof(buf)); | 636 | strlcpy(buf, name, sizeof(buf)); |
633 | 637 | ||
634 | return buflib_alloc_ex(ctx, *size, buf, ops); | 638 | return buflib_alloc_ex(ctx, *size, buf, ops); |