summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-04-22 14:48:05 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-04-22 14:48:05 +0000
commit4194990d73b1070d3f7f3763e54d04f87b4089ad (patch)
tree916ff5d668ff125441ff8829eb5771d9358c7595
parentf3bc1efc49826454a895c1c1f46fbe2cfd23f492 (diff)
downloadrockbox-4194990d73b1070d3f7f3763e54d04f87b4089ad.tar.gz
rockbox-4194990d73b1070d3f7f3763e54d04f87b4089ad.tar.bz2
rockbox-4194990d73b1070d3f7f3763e54d04f87b4089ad.zip
Replace one hack with a better hack
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9759 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/mpa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c
index 51038c5244..da449f4d8d 100644
--- a/apps/codecs/mpa.c
+++ b/apps/codecs/mpa.c
@@ -181,7 +181,7 @@ enum codec_status codec_start(struct codec_api *api)
inputbuffer = ci->request_buffer(&size, INPUT_CHUNK_SIZE);
if (size == 0 || inputbuffer == NULL)
break;
- mad_stream_buffer(&stream, (unsigned char *)inputbuffer, size);
+ mad_stream_buffer(&stream, (unsigned char *)inputbuffer, size + 8);
}
if (mad_frame_decode(&frame, &stream)) {
@@ -192,7 +192,7 @@ enum codec_status codec_start(struct codec_api *api)
break;
/* Fill the buffer */
- if (stream.next_frame && stream.next_frame != stream.this_frame)
+ if (stream.next_frame)
ci->advance_buffer_loc((void *)stream.next_frame);
else
ci->advance_buffer(size);