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
This commit is contained in:
Warren Dukes 2004-10-25 20:11:35 +00:00
parent ce10ba4b11
commit fececcea3c
2 changed files with 8 additions and 4 deletions

View File

@ -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));

View File

@ -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;