aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-09 16:58:33 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-09 16:58:33 +0000
commitbfaf6cbd9d3c39d466179be9fad0654cc75a4765 (patch)
tree915d4f130377ce8c2c02772862e1ef3ab2a65705 /src/outputBuffer.c
parentd5f7a7745a188375c5accbbd2eb82c2776cc2a6e (diff)
downloadmpd-bfaf6cbd9d3c39d466179be9fad0654cc75a4765.tar.gz
mpd-bfaf6cbd9d3c39d466179be9fad0654cc75a4765.tar.xz
mpd-bfaf6cbd9d3c39d466179be9fad0654cc75a4765.zip
fix some streaming metadata issues
git-svn-id: https://svn.musicpd.org/mpd/trunk@1416 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/outputBuffer.c')
-rw-r--r--src/outputBuffer.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index 39d9b66af..bde118ff8 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -21,6 +21,7 @@
#include "pcm_utils.h"
#include "playerData.h"
#include "utils.h"
+#include "log.h"
#include <string.h>
@@ -154,10 +155,12 @@ int copyMpdTagToOutputBuffer(OutputBuffer * cb, MpdTag * tag) {
sendMetaChunk = 0;
if(last) free(last);
last = NULL;
+ DEBUG("copyMpdTagToOB: !acceptMetadata || !tag\n");
return 0;
}
if(last && mpdTagsAreEqual(last, tag)) {
+ DEBUG("copyMpdTagToOB: same as last\n");
return 0;
}
@@ -167,7 +170,11 @@ int copyMpdTagToOutputBuffer(OutputBuffer * cb, MpdTag * tag) {
nextChunk = currentMetaChunk+1;
if(nextChunk >= BUFFERED_METACHUNKS) nextChunk = 0;
- if(cb->metaChunkSet[nextChunk]) return -1;
+ if(cb->metaChunkSet[nextChunk]) {
+ sendMetaChunk = 0;
+ DEBUG("copyMpdTagToOB: metachunk in use!\n");
+ return -1;
+ }
sendMetaChunk = 1;
currentMetaChunk = nextChunk;
@@ -178,5 +185,7 @@ int copyMpdTagToOutputBuffer(OutputBuffer * cb, MpdTag * tag) {
cb->metaChunkSet[nextChunk] = 1;
+ DEBUG("copyMpdTagToOB: copiedTag\n");
+
return 0;
}