aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--src/audioOutput_shout.c2
-rw-r--r--src/decode.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/src/audioOutput_shout.c b/src/audioOutput_shout.c
index 514fbbe68..777fe9c41 100644
--- a/src/audioOutput_shout.c
+++ b/src/audioOutput_shout.c
@@ -405,8 +405,6 @@ static void shout_sendMetadata(AudioOutput * audioOutput, MpdTag * tag) {
}
- DEBUG("shout: got tag\n");
-
vorbis_analysis_headerout(&(sd->vd), &(sd->vc), &(sd->header_main),
&(sd->header_comments), &(sd->header_codebooks));
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;