aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-10-25 20:09:03 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-10-25 20:09:03 +0000
commitce10ba4b119faac3eb7c5d1251b1a875d28056c1 (patch)
tree0770735cd27e4ac6ca137656c341c6ca346e45ab /src/decode.c
parentb6bcc65a454b711b586ca221323f1efba35e6dab (diff)
downloadmpd-ce10ba4b119faac3eb7c5d1251b1a875d28056c1.tar.gz
mpd-ce10ba4b119faac3eb7c5d1251b1a875d28056c1.tar.xz
mpd-ce10ba4b119faac3eb7c5d1251b1a875d28056c1.zip
fix a big time bug in metadataChunk (off by one in an array assignment)
also, now we have metadata in our streams git-svn-id: https://svn.musicpd.org/mpd/trunk@2337 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/decode.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/decode.c b/src/decode.c
index 7296e154c..55252c46e 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -145,6 +145,7 @@ int waitOnDecode(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb,
{
strncpy(pc->currentUrl, pc->utf8url, MAXPATHLEN);
pc->currentUrl[MAXPATHLEN] = '\0';
+ MpdTag * tag = NULL;
while(decode_pid && *decode_pid>0 && dc->start) my_usleep(10000);
@@ -156,8 +157,14 @@ int waitOnDecode(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb,
return -1;
}
+ if((tag = metadataChunkToMpdTagDup(&(pc->fileMetadataChunk)))) {
+ sendMetdataToAudioDevice(tag);
+ printMpdTag(stdout, tag);
+ freeMpdTag(tag);
+ tag = NULL;
+ }
+
pc->totalTime = pc->fileTime;
- pc->elapsedTime = 0;
pc->bitRate = 0;
pc->sampleRate = 0;
pc->bits = 0;
@@ -465,6 +472,7 @@ void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb) {
if(waitOnDecode(pc,dc,cb,&decodeWaitedOn)<0) return;
+ pc->elapsedTime = 0;
pc->state = PLAYER_STATE_PLAY;
pc->play = 0;
kill(getppid(),SIGUSR1);