diff options
Diffstat (limited to 'apps/codecs/mpa.c')
| -rw-r--r-- | apps/codecs/mpa.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index bbfbb57..fa5dab6 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c @@ -34,8 +34,6 @@ struct mad_synth synth IBSS_ATTR; void abort(void) { } -/* These extra 8 bytes fake-added to each read make mad decode the last frame */ -#define MAD_BUFFER_GUARD 8 #define INPUT_CHUNK_SIZE 8192 mad_fixed_t mad_frame_overlap[2][32][18] IBSS_ATTR; @@ -183,6 +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; + /* size + MAD_BUFFER_GUARD to help mad decode the last frame */ mad_stream_buffer(&stream, (unsigned char *)inputbuffer, size + MAD_BUFFER_GUARD); } |