MP4 atoms incorrectly showing as non-null empty strings (e.g., "aART" and "\251wrt" atoms)
Duke Yin
yindesu at gmail.com
Wed Apr 3 04:11:18 UTC 2013
Hello all,
I am trying to use Taglib to parse tags from some m4a files.
Unfortunately, Taglib is returning empty (not null) strings for the
AlbumArtist and Composer fields on some of my files. (On one of my files,
it also returns a null string for the Date/Year atom.) These incorrect
atoms are read correctly by iTunes, Mp3tag, foobar2000.
This is the code I am using:
// 'keys' is an array of 4-char atoms I want, including "aART" and "\251wrt"
for(int i = 0; i < keysLength; i++) {
if (tag->itemListMap().contains(keys[i]) &&
!tag->itemListMap()[keys[i]].toStringList().isEmpty()) {
print(" [%s] = %s", keys[i],
tag->itemListMap()[keys[i]].toStringList().front().toCString(true));
print(" [%s] = %s.", keys[i],
tag->itemListMap()[keys[i]].toStringList().toString(" ; ").toCString(true));
} else {
print(" [%s] null.", keys[i]);
}
}
e.g. expected output:
[aART] = some artist.
[aART] = some artist.
[?wrt] = some composer.
[?wrt] = some composer.
But actual (incorrect) output:
[aART] = .
[aART] = .
[?wrt] = .
[?wrt] = .
Is my code the correct way to access a specific set of MP4 atoms? If so,
can I pass my files to someone who can analyze them? I tried copying the
tags into silence files, but Taglib was reading the silence files
correctly. When I analyzed the files in Isoviewer, I could not find any
difference in the MP4 atoms, except perhaps a missing "utda/ndrm" atom in
the silence files.
Thanks,
Duke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20130402/ec830329/attachment.html>
More information about the taglib-devel
mailing list