From 52ee132d92d4a04d31bbbdeb7c6c0077bd2a2828 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Sep 2013 19:11:50 +0200 Subject: TagHandler: use a TagBuilder internally Reduce heap allocator overhead. --- src/decoder/FlacMetadata.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/decoder/FlacMetadata.cxx') 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 @@ -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 -- cgit v1.2.3