decoder/flac: support streams without STREAMINFO block

This commit is contained in:
Max Kellermann
2010-01-06 09:54:09 +01:00
parent de0cdee4aa
commit a942384fbf
3 changed files with 53 additions and 1 deletions

View File

@@ -247,6 +247,18 @@ flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd,
return false;
}
if (data->initialized)
/* done */
return true;
if (data->input_stream->seekable)
/* allow the workaround below only for nonseekable
streams*/
return false;
/* no stream_info packet found; try to initialize the decoder
from the first frame header */
FLAC__stream_decoder_process_single(sd);
return data->initialized;
}