From 790228cba4ff63d051181e422c731c3a11da4909 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Wed, 10 Nov 2004 12:44:29 +0000 Subject: don't use tag tracker for titles, it just wastes time and memory git-svn-id: https://svn.musicpd.org/mpd/branches/r2562-metadata-handling-rewrite@2575 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/tagTracker.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tagTracker.c b/src/tagTracker.c index e7854a0e6..b3e7b3be0 100644 --- a/src/tagTracker.c +++ b/src/tagTracker.c @@ -18,6 +18,8 @@ static List * tagLists[TAG_NUM_OF_ITEM_TYPES] = char * getTagItemString(int type, char * string) { ListNode * node; + + if(type == TAG_ITEM_TITLE) return strdup(string); if(tagLists[type] == NULL) { tagLists[type] = makeList(free); @@ -39,8 +41,14 @@ char * getTagItemString(int type, char * string) { void removeTagItemString(int type, char * string) { ListNode * node; - assert(tagLists[type]); assert(string); + + if(type == TAG_ITEM_TITLE) { + free(string); + return; + } + + assert(tagLists[type]); if(tagLists[type] == NULL) return; node = findNodeInList(tagLists[type], string); -- cgit v1.2.3