Replace one hack with a better hack

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9759 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Brandon Low 2006-04-22 14:48:05 +00:00
parent f3bc1efc49
commit 4194990d73

View file

@ -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);