aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-06-21 15:09:50 +0200
committerMax Kellermann <max@duempel.org>2015-06-21 15:10:55 +0200
commit6d6f2746485d8234110858e5e3621b0ce03c6c8a (patch)
treed4b38afc34e259eda4446d36819c89de1262e9a6 /src
parent9acefcb256347ac252db3ea61be2e047d32c0a51 (diff)
downloadmpd-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.cxx7
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;