From ab95027fc6e9d873501a468694399f3b4818ce72 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Fri, 8 Jul 2016 23:12:49 +0200
Subject: [PATCH] decoder/flac: suppress warning at end of stream

This is required if a stream ands without another chained FLAC file.
---
 src/decoder/plugins/FlacDecoderPlugin.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
 	}