}
ogg_bytes_read = ogg_bytes_to_read;
- if(decoder->private_->read_callback(decoder, (FLAC__byte*)oggbuf, &ogg_bytes_read, decoder->private_->client_data) != FLAC__STREAM_DECODER_READ_STATUS_CONTINUE) {
- decoder->protected_->state = OggFLAC__STREAM_DECODER_READ_ERROR;
- return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
+ {
+ FLAC__StreamDecoderReadStatus read_status = decoder->private_->read_callback(decoder, (FLAC__byte*)oggbuf, &ogg_bytes_read, decoder->private_->client_data);
+ if(read_status != FLAC__STREAM_DECODER_READ_STATUS_CONTINUE) {
+ if(read_status == FLAC__STREAM_DECODER_READ_STATUS_ABORT)
+ decoder->protected_->state = OggFLAC__STREAM_DECODER_READ_ERROR;
+ return read_status;
+ }
}
if(ogg_sync_wrote(&decoder->private_->ogg.sync_state, ogg_bytes_read) < 0) {