Lines 155-165
Link Here
|
155 |
|
155 |
|
156 |
long res = data->source->read((char*)buffer, *bytes); |
156 |
long res = data->source->read((char*)buffer, *bytes); |
157 |
if (res<=0) { |
157 |
if (res<=0) { |
158 |
if (data->source->eof()) data->eof = true; |
|
|
159 |
#ifdef LEGACY_FLAC |
158 |
#ifdef LEGACY_FLAC |
|
|
159 |
if (data->source->eof()) data->eof = true; |
160 |
return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR; |
160 |
return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR; |
161 |
#else |
161 |
#else |
162 |
return FLAC__STREAM_DECODER_READ_STATUS_ABORT; |
162 |
if (data->source->eof()) { |
|
|
163 |
data->eof = true; |
164 |
return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM; |
165 |
} |
166 |
else |
167 |
return FLAC__STREAM_DECODER_READ_STATUS_ABORT; |
163 |
#endif |
168 |
#endif |
164 |
} |
169 |
} |
165 |
else { |
170 |
else { |