aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-07 15:00:18 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-07 15:00:18 +0000
commit608a15a8853c020aec562ac16bac8e6067c6fcdd (patch)
treed77b97ea8c0db52b45523ce013a515ce2c7f856f /src/outputBuffer.c
parent333c0a6fdd6039e936f0de1cd9f7534a9339deda (diff)
downloadmpd-608a15a8853c020aec562ac16bac8e6067c6fcdd.tar.gz
mpd-608a15a8853c020aec562ac16bac8e6067c6fcdd.tar.xz
mpd-608a15a8853c020aec562ac16bac8e6067c6fcdd.zip
bug fix for metadata again, had an extra "!" in mpdTagsAreEqual()
git-svn-id: https://svn.musicpd.org/mpd/trunk@1371 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/outputBuffer.c')
-rw-r--r--src/outputBuffer.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index 44621d9d4..606f231fc 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -158,24 +158,28 @@ int copyMpdTagToOutputBuffer(OutputBuffer * cb, MpdTag * tag) {
return 0;
}
+ if(!last) printf("OH SHIT\n");
+
if(last && mpdTagsAreEqual(last, tag)) {
printf("same as last\n");
return 0;
}
- sendMetaChunk = 1;
+ if(last) freeMpdTag(last);
+ last = NULL;
+
nextChunk = currentMetaChunk+1;
if(nextChunk >= BUFFERED_METACHUNKS) nextChunk = 0;
if(cb->metaChunkSet[nextChunk]) return -1;
+ sendMetaChunk = 1;
currentMetaChunk = nextChunk;
- printMpdTag(stdout, tag);
-
- if(last) freeMpdTag(last);
last = mpdTagDup(tag);
+ printMpdTag(stdout, last);
+
copyMpdTagToMetadataChunk(tag, &(cb->metadataChunks[currentMetaChunk]));
cb->metaChunkSet[nextChunk] = 1;