aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-07 12:11:57 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-07 12:11:57 +0000
commitae44b7dae5878a1484243b89d14317d2dab5fdde (patch)
treeb122ffcb1ad6dd3a9c5ea60e0570ea5884ca3b2f /src/outputBuffer.c
parent08603344884138660d750df2c473a7cf34aab782 (diff)
downloadmpd-ae44b7dae5878a1484243b89d14317d2dab5fdde.tar.gz
mpd-ae44b7dae5878a1484243b89d14317d2dab5fdde.tar.xz
mpd-ae44b7dae5878a1484243b89d14317d2dab5fdde.zip
potential bugfixes for handling metadata in player/decoder
git-svn-id: https://svn.musicpd.org/mpd/trunk@1369 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/outputBuffer.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index a62d97778..fd8d5b83f 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -38,15 +38,20 @@ void clearAllMetaChunkSets(OutputBuffer * cb) {
}
void clearOutputBuffer(OutputBuffer * cb) {
+ int currentSet = 1;
+
currentChunk = -1;
cb->end = cb->begin;
cb->wrap = 0;
- if(cb->acceptMetadata) {
- clearAllMetaChunkSets(cb);
- if(sendMetaChunk == 0 && currentMetaChunk >= 0) {
- cb->metaChunkSet[currentChunk] = 1;
- }
+ /* be sure to reset metaChunkSets cause we are skipping over audio
+ * audio chunks, and thus skipping over metadata */
+ if(sendMetaChunk == 0 && currentMetaChunk >= 0) {
+ currentSet = cb->metaChunkSet[currentChunk];
+ }
+ clearAllMetaChunkSets(cb);
+ if(sendMetaChunk == 0 && currentMetaChunk >= 0) {
+ cb->metaChunkSet[currentChunk] = currentSet;
}
}