I'd like to suggest a modification to existing libflac implementation. When you call the FLAC__stream_decoder_process_* functions there's no way
from returning it when for some reason you don't have the complete data for extracting the next metadata / audio frame.
For example, if the ReadCallback function reads the data during decoding from a buffer, but the buffer doesn't hold the whole data the decoder requires.
Then you give the data from the buffer to the decoder, but the ReadCallback handler will be called again, and you can choose only to return FLAC__STREAM_DECODER_READ_STATUS_ABORT which aborts the decoding process. If you were able to return something like FLAC__STREAM_DECODER_READ_STATUS_NO_DATA_AVAILABLE, then the process function would return, and you would be able to fill the buffer again
with the remaining data. I'm writing a Flac interface for my application and it can't be truly robust without it, because for some reason it cannot be guaranteed that a buffer from which the data is transferred to the decoder always holds enough data for a whole metadata block or audio frame.
Please include this option in the next release.