Proposed fix for FS#12878: Zero-length embedded album art prevents mp3 playback

see http://www.rockbox.org/tracker/task/12878

Change-Id: Ib4233c06e18d1d193dfb9e73e745ca5d174e40b2
Reviewed-on: http://gerrit.rockbox.org/507
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
This commit is contained in:
Jack Whitham 2013-07-11 21:09:58 +01:00 committed by Thomas Martitz
parent 10d71bb910
commit ca423ed0e3

View file

@ -355,7 +355,8 @@ static int parsealbumart( struct mp3entry* entry, char* tag, int bufferpos )
/* fixup offset&size for image data */
entry->albumart.pos += tag - start;
entry->albumart.size -= tag - start;
entry->has_embedded_albumart = true;
/* check for malformed tag with no picture data */
entry->has_embedded_albumart = (entry->albumart.size != 0);
}
/* return bufferpos as we didn't store anything in id3v2buf */
return bufferpos;