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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user