diff options
author | Max Kellermann <max@musicpd.org> | 2021-08-05 17:59:51 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2021-08-05 18:02:45 +0200 |
commit | b979245d6c9491d5cd6bd12b250ccd6dc7a13609 (patch) | |
tree | 876a2a2b76f886c6a3e84334c9b398823a1da04d | |
parent | 17b0ac75ca9d8d81e4eabaa8f11bec68830eb9ba (diff) |
decoder/Bridge: call UpdateStreamTag() only if there is no pending seek
If UpdateStreamTag() gets called while an initial seek is pending, the
result will never be submitted to a MusicChunk. By avoiding the
UpdateStreamTag() call in that case (by moving UpdateStreamTag() to
after the PrepareInitialSeek() check), the song_tag is preserved until
UpdateStreamTag() is called again from SubmitData().
This fixes missing tags in the "httpd" output.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1137
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/decoder/Bridge.cxx | 8 |
2 files changed, 5 insertions, 4 deletions
@@ -9,6 +9,7 @@ ver 0.22.10 (not yet released) * tags - fix crash caused by bug in TagBuilder and a few potential reference leaks * output + - httpd: fix missing tag after seeking into a new song - oss: fix channel order of multi-channel files ver 0.22.9 (2021/06/23) diff --git a/src/decoder/Bridge.cxx b/src/decoder/Bridge.cxx index 79ef2c4f7..30a56d53d 100644 --- a/src/decoder/Bridge.cxx +++ b/src/decoder/Bridge.cxx @@ -581,10 +581,6 @@ DecoderBridge::SubmitTag(InputStream *is, Tag &&tag) noexcept decoder_tag = std::make_unique<Tag>(std::move(tag)); - /* check for a new stream tag */ - - UpdateStreamTag(is); - /* check if we're seeking */ if (PrepareInitialSeek()) @@ -593,6 +589,10 @@ DecoderBridge::SubmitTag(InputStream *is, Tag &&tag) noexcept function here */ return DecoderCommand::SEEK; + /* check for a new stream tag */ + + UpdateStreamTag(is); + /* send tag to music pipe */ if (stream_tag != nullptr) |