diff options
author | Max Kellermann <max@duempel.org> | 2015-06-21 15:09:50 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-06-21 15:10:55 +0200 |
commit | 6d6f2746485d8234110858e5e3621b0ce03c6c8a (patch) | |
tree | d4b38afc34e259eda4446d36819c89de1262e9a6 /src | |
parent | 9acefcb256347ac252db3ea61be2e047d32c0a51 (diff) | |
download | mpd-6d6f2746485d8234110858e5e3621b0ce03c6c8a.tar.gz mpd-6d6f2746485d8234110858e5e3621b0ce03c6c8a.tar.xz mpd-6d6f2746485d8234110858e5e3621b0ce03c6c8a.zip |
DecoderAPI: discard unused song tag early
If there's a stream tag, don't let the song tag override it in the
next update_stream_tag() call.
Diffstat (limited to '')
-rw-r--r-- | src/decoder/DecoderAPI.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/decoder/DecoderAPI.cxx b/src/decoder/DecoderAPI.cxx index 366c4af6d..941d3a70d 100644 --- a/src/decoder/DecoderAPI.cxx +++ b/src/decoder/DecoderAPI.cxx @@ -433,8 +433,11 @@ update_stream_tag(Decoder &decoder, InputStream *is) /* no stream tag present - submit the song tag instead */ - decoder.song_tag = nullptr; - } + } else + /* discard the song tag; we don't need it */ + delete decoder.song_tag; + + decoder.song_tag = nullptr; delete decoder.stream_tag; decoder.stream_tag = tag; |