aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/FlacMetadata.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-05 19:11:50 +0200
committerMax Kellermann <max@duempel.org>2013-09-26 17:35:08 +0200
commit52ee132d92d4a04d31bbbdeb7c6c0077bd2a2828 (patch)
tree098cf4f9385693b28e41c5342fcdfae416b058dd /src/decoder/FlacMetadata.cxx
parent7ca0aedcfc35c784d7ae07cd1f1e8dce684e5901 (diff)
downloadmpd-52ee132d92d4a04d31bbbdeb7c6c0077bd2a2828.tar.gz
mpd-52ee132d92d4a04d31bbbdeb7c6c0077bd2a2828.tar.xz
mpd-52ee132d92d4a04d31bbbdeb7c6c0077bd2a2828.zip
TagHandler: use a TagBuilder internally
Reduce heap allocator overhead.
Diffstat (limited to '')
-rw-r--r--src/decoder/FlacMetadata.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/decoder/FlacMetadata.cxx b/src/decoder/FlacMetadata.cxx
index a27fec5d2..49e4851e8 100644
--- a/src/decoder/FlacMetadata.cxx
+++ b/src/decoder/FlacMetadata.cxx
@@ -23,6 +23,7 @@
#include "tag/Tag.hxx"
#include "tag/TagHandler.hxx"
#include "tag/TagTable.hxx"
+#include "tag/TagBuilder.hxx"
#include "replay_gain_info.h"
#include <glib.h>
@@ -231,7 +232,9 @@ void
flac_vorbis_comments_to_tag(Tag &tag,
const FLAC__StreamMetadata_VorbisComment *comment)
{
- flac_scan_comments(comment, &add_tag_handler, &tag);
+ TagBuilder tag_builder;
+ flac_scan_comments(comment, &add_tag_handler, &tag_builder);
+ tag_builder.Commit(tag);
}
void