decoder/flac: suppress warning at end of stream

This is required if a stream ands without another chained FLAC file.
This commit is contained in:
Max Kellermann 2016-07-08 23:12:49 +02:00
parent ed3bc4ab63
commit ab95027fc6
1 changed files with 2 additions and 1 deletions

View File

@ -135,7 +135,8 @@ static bool
flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd)
{
if (!FLAC__stream_decoder_process_until_end_of_metadata(sd)) {
LogWarning(flac_domain, "problem reading metadata");
if (FLAC__stream_decoder_get_state(sd) != FLAC__STREAM_DECODER_END_OF_STREAM)
LogWarning(flac_domain, "problem reading metadata");
return false;
}