Merge pull request #654 from TsudaKageyu/xiph-setcomment

Fix XiphComment::setComment() for the case that a Vorbis comment has …
This commit is contained in:
Tsuda Kageyu
2015-11-20 23:02:51 +09:00
2 changed files with 26 additions and 1 deletions

View File

@ -137,7 +137,14 @@ void Ogg::XiphComment::setAlbum(const String &s)
void Ogg::XiphComment::setComment(const String &s)
{
addField(d->commentField.isEmpty() ? "DESCRIPTION" : d->commentField, s);
if(d->commentField.isEmpty()) {
if(!d->fieldListMap["DESCRIPTION"].isEmpty())
d->commentField = "DESCRIPTION";
else
d->commentField = "COMMENT";
}
addField(d->commentField, s);
}
void Ogg::XiphComment::setGenre(const String &s)