aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-10-25 20:11:35 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-10-25 20:11:35 +0000
commitfececcea3c6e492d9d9d828d64f012bb1fdf793c (patch)
tree173cf7ed98efe64bc095934cab1c40cafc570cb1 /src/decode.c
parentce10ba4b119faac3eb7c5d1251b1a875d28056c1 (diff)
downloadmpd-fececcea3c6e492d9d9d828d64f012bb1fdf793c.tar.gz
mpd-fececcea3c6e492d9d9d828d64f012bb1fdf793c.tar.xz
mpd-fececcea3c6e492d9d9d828d64f012bb1fdf793c.zip
parse metadata and send to output when playing another stream
git-svn-id: https://svn.musicpd.org/mpd/trunk@2338 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/decode.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/decode.c b/src/decode.c
index 55252c46e..a02dfe063 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -159,9 +159,7 @@ int waitOnDecode(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb,
if((tag = metadataChunkToMpdTagDup(&(pc->fileMetadataChunk)))) {
sendMetdataToAudioDevice(tag);
- printMpdTag(stdout, tag);
freeMpdTag(tag);
- tag = NULL;
}
pc->totalTime = pc->fileTime;
@@ -428,7 +426,15 @@ void handleMetadata(OutputBuffer * cb, PlayerControl * pc, int * previous,
if(!(*currentChunkSent) && pc->metadataState ==
PLAYER_METADATA_STATE_WRITE)
{
+ MpdTag * tag = NULL;
+
*currentChunkSent = 1;
+
+ if((tag = metadataChunkToMpdTagDup(currentChunk))) {
+ sendMetdataToAudioDevice(tag);
+ freeMpdTag(tag);
+ }
+
memcpy(&(pc->metadataChunk), currentChunk,
sizeof(MetadataChunk));
pc->metadataState = PLAYER_METADATA_STATE_READ;