diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-11-10 12:44:29 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-11-10 12:44:29 +0000 |
commit | 790228cba4ff63d051181e422c731c3a11da4909 (patch) | |
tree | 3f615cf7f6c18cf96bcc42f448a25b546cc04ab8 /src | |
parent | c45149c33ea3c42fcdf94bb0ed381dc0f58a2ad8 (diff) | |
download | mpd-790228cba4ff63d051181e422c731c3a11da4909.tar.gz mpd-790228cba4ff63d051181e422c731c3a11da4909.tar.xz mpd-790228cba4ff63d051181e422c731c3a11da4909.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/tagTracker.c | 10 |
1 files changed, 9 insertions, 1 deletions
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); |