mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
fix so that file decoder catches when stream decoder says EOF
This commit is contained in:
@@ -158,6 +158,9 @@ bool FLAC__file_decoder_process_whole_file(FLAC__FileDecoder *decoder)
|
|||||||
bool ret;
|
bool ret;
|
||||||
assert(decoder != 0);
|
assert(decoder != 0);
|
||||||
|
|
||||||
|
if(decoder->guts->stream->state == FLAC__STREAM_DECODER_END_OF_FILE)
|
||||||
|
decoder->state = FLAC__FILE_DECODER_END_OF_FILE;
|
||||||
|
|
||||||
if(decoder->state == FLAC__FILE_DECODER_END_OF_FILE)
|
if(decoder->state == FLAC__FILE_DECODER_END_OF_FILE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -175,6 +178,9 @@ bool FLAC__file_decoder_process_metadata(FLAC__FileDecoder *decoder)
|
|||||||
bool ret;
|
bool ret;
|
||||||
assert(decoder != 0);
|
assert(decoder != 0);
|
||||||
|
|
||||||
|
if(decoder->guts->stream->state == FLAC__STREAM_DECODER_END_OF_FILE)
|
||||||
|
decoder->state = FLAC__FILE_DECODER_END_OF_FILE;
|
||||||
|
|
||||||
if(decoder->state == FLAC__FILE_DECODER_END_OF_FILE)
|
if(decoder->state == FLAC__FILE_DECODER_END_OF_FILE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -192,6 +198,9 @@ bool FLAC__file_decoder_process_one_frame(FLAC__FileDecoder *decoder)
|
|||||||
bool ret;
|
bool ret;
|
||||||
assert(decoder != 0);
|
assert(decoder != 0);
|
||||||
|
|
||||||
|
if(decoder->guts->stream->state == FLAC__STREAM_DECODER_END_OF_FILE)
|
||||||
|
decoder->state = FLAC__FILE_DECODER_END_OF_FILE;
|
||||||
|
|
||||||
if(decoder->state == FLAC__FILE_DECODER_END_OF_FILE)
|
if(decoder->state == FLAC__FILE_DECODER_END_OF_FILE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -209,6 +218,9 @@ bool FLAC__file_decoder_process_remaining_frames(FLAC__FileDecoder *decoder)
|
|||||||
bool ret;
|
bool ret;
|
||||||
assert(decoder != 0);
|
assert(decoder != 0);
|
||||||
|
|
||||||
|
if(decoder->guts->stream->state == FLAC__STREAM_DECODER_END_OF_FILE)
|
||||||
|
decoder->state = FLAC__FILE_DECODER_END_OF_FILE;
|
||||||
|
|
||||||
if(decoder->state == FLAC__FILE_DECODER_END_OF_FILE)
|
if(decoder->state == FLAC__FILE_DECODER_END_OF_FILE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user