From f7f7490e3e5a57ac191ddd9ef6b5c41777c0dcec Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Sat, 4 Nov 2006 04:20:02 +0000 Subject: [PATCH] minor tweak to read callback eof handling --- src/flac/encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flac/encode.c b/src/flac/encode.c index 955e4a0..5d7fd81 100644 --- a/src/flac/encode.c +++ b/src/flac/encode.c @@ -2267,7 +2267,7 @@ FLAC__StreamDecoderReadStatus flac_decoder_read_callback(const FLAC__StreamDecod *bytes = n + fread(buffer, 1, *bytes-n, data->encoder_session->fin); if(ferror(data->encoder_session->fin)) return FLAC__STREAM_DECODER_READ_STATUS_ABORT; - else if(0 == *bytes && feof(data->encoder_session->fin)) + else if(0 == *bytes) return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM; else return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE; -- 2.7.4