From 6d6f2746485d8234110858e5e3621b0ce03c6c8a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 21 Jun 2015 15:09:50 +0200 Subject: 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. --- src/decoder/DecoderAPI.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3