--- akode-2.0.1-b2/akode/plugins/xiph_decoder/flac_decoder.cpp 2006-10-26 20:12:00.000000000 -0700 +++ akode-2.0.1-b2/akode/plugins/xiph_decoder/flac_decoder.cpp 2006-11-03 21:02:51.000000000 -0800 @@ -155,11 +155,16 @@ long res = data->source->read((char*)buffer, *bytes); if (res<=0) { - if (data->source->eof()) data->eof = true; #ifdef LEGACY_FLAC + if (data->source->eof()) data->eof = true; return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR; #else - return FLAC__STREAM_DECODER_READ_STATUS_ABORT; + if (data->source->eof()) { + data->eof = true; + return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM; + } + else + return FLAC__STREAM_DECODER_READ_STATUS_ABORT; #endif } else {