FS#12009 - m4a (iTunes) embedded album art

Attached to Project: Rockbox
Opened by Jason Yu (captainkewl) - Sunday, 13 March 2011, 20:57 GMT
Last edited by Andree Buschmann (Buschel) - Tuesday, 15 March 2011, 20:18 GMT
Task Type Patches
Category ID3 / meta data
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Reads the covr tag and sends data to the id3 embedded art structure.

Wasn't entirely sure how to deal with the file offset when consuming the data. Incrementing the offset like read_mp4_tag does causes a codec failure on target (iPod 5G); worked fine when I either left it alone or returned it to the original position with an additional lseek.
This task depends upon

Closed by  Andree Buschmann (Buschel)
Tuesday, 15 March 2011, 20:18 GMT
Reason for closing:  Accepted
Additional comments about closing:  Submitted with r29591.
Comment by Andree Buschmann (Buschel) - Monday, 14 March 2011, 07:13 GMT
Can you please attach such m4a-files (1x png, 1x jpg) for validation?
Comment by Thomas Martitz (kugel.) - Monday, 14 March 2011, 11:18 GMT
Seems to work for my test file. I've written AA into it with easytag on linux and rockbox reads and displays the jpg version fine, the png one isn't displayed but doesn't cause horrible failure either.
Comment by Thomas Martitz (kugel.) - Monday, 14 March 2011, 11:45 GMT
Looking at taglib, there seems to be metadata in the 16 bytes this patch jumps over (denoting the image time), possibly worth reading in.
Comment by Jason Yu (captainkewl) - Tuesday, 15 March 2011, 02:25 GMT
Removed that read/lseek brainfart. The first 16 bytes produced by read_mp4_atom is the tag header (see read_mp4_tag). The png detection is there for forward compatibility...

Some sample m4a files:
Comment by Andree Buschmann (Buschel) - Tuesday, 15 March 2011, 06:49 GMT
Works like charm for me with the files I downloaded from the link above and two other files with embedded art that I have available.