summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-07-08 23:12:49 +0200
committerMax Kellermann <max@duempel.org>2016-07-08 23:19:47 +0200
commitab95027fc6e9d873501a468694399f3b4818ce72 (patch)
tree9f2f6d42b68c3f4f38bb1d22c6ea35e23f7f8f56
parented3bc4ab632305a54c41377b10e70991b2aeb003 (diff)
decoder/flac: suppress warning at end of stream
This is required if a stream ands without another chained FLAC file.
-rw-r--r--src/decoder/plugins/FlacDecoderPlugin.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/decoder/plugins/FlacDecoderPlugin.cxx b/src/decoder/plugins/FlacDecoderPlugin.cxx
index 0990899d1..c78b02310 100644
--- a/src/decoder/plugins/FlacDecoderPlugin.cxx
+++ b/src/decoder/plugins/FlacDecoderPlugin.cxx
@@ -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;
}