diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-06-01 11:18:25 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-06-01 11:18:25 +0000 |
commit | fe0b751c8278ab07a350cd4d363743b734f4f830 (patch) | |
tree | 288ce38c0401ed60f416da239c94654df4413657 /src/player.c | |
parent | 187eba5754ddc99f5105fe2edac9c817fd2f7561 (diff) | |
download | mpd-fe0b751c8278ab07a350cd4d363743b734f4f830.tar.gz mpd-fe0b751c8278ab07a350cd4d363743b734f4f830.tar.xz mpd-fe0b751c8278ab07a350cd4d363743b734f4f830.zip |
ogg voribs comment parsing on the fly in the decoder
git-svn-id: https://svn.musicpd.org/mpd/trunk@1279 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/player.c b/src/player.c index 7a6442991..9427ddf21 100644 --- a/src/player.c +++ b/src/player.c @@ -56,6 +56,8 @@ static void resetPlayerMetadata() { if(pc->metadataState == PLAYER_METADATA_STATE_READ) { pc->metadataState = PLAYER_METADATA_STATE_WRITE; pc->title = -1; + pc->artist = -1; + pc->album = -1; } } @@ -489,6 +491,12 @@ Song * playerCurrentDecodeSong() { if(pc->title >= 0) { song->tag->title = strdup(pc->title + pc->metadata); } + if(pc->artist >= 0) { + song->tag->artist = strdup(pc->artist + pc->metadata); + } + if(pc->album >= 0) { + song->tag->album = strdup(pc->album + pc->metadata); + } validateUtf8Tag(song->tag); resetPlayerMetadata(); return song; |