MAD doesn't decode last frame in stream buffer unless it has 8 bytes extra

Jedediah Smith <[email protected]>
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
Pass a buffer to mad_stream_buffer which ends exactly on a frame boundary. 
mad_frame_decode will fail on the last frame and set the error to 
MAD_ERROR_BUFLEN even though entire frame is there. As much as 7 extra 
bytes can be added to the end of the buffer and the last frame decode will 
still fail. If 8 bytes are added, the frame decode will succeed.

Is this a bug or by design? If by design, how can I decode the last frame 
without adding padding after it?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.