Bugzilla – Bug 7648
JPEG image headers truncated for some APIC frames
Last modified: 2009-07-31 10:18:43 UTC
Images embedded in some MP3 files are corrupted and do not display properly in SqueezeCenter nor on the remote. I have been seeing this behaviour with some regularity on my system. I think I have found the problem: the file header is being truncated at the beginning by one byte. I added an image file using EasyTAG (Version 2.1.2, Ubuntu Gutsy, with libid3tag 0.15.1 (beta)). The embedded image is read and displayed properly in Rhythmbox (version 0.11.2), but with SqueezeCenter (version info below) the cover.jpg presented has the first byte truncated. Instead of beginning "FFD8FFE0" it begins "D8FFE0" and nothing recognizes it as a JPEG file -- not Gnome, not eog, not Gimp, and obviously not Firefox or my remote. If I take that image file and prepend "FF" and save it, the image displays correctly everywhere. So obviously there's an off-by-one error somewhere in the image extraction code. It is apparently manifesting itself somewhat irregularly. I have (many) MP3 files for which SqueezeCenter manifests this behaviour regularly, if a member of the Slim Devices team wants a test case -- I can't attach it b/c it is too large. I have attached a zip file with the broken and corrected image (I couldn't include the broken image itself, because this forum rejects it as an invalid image, as it should). SqueezeCenter Version: 7.0 - 17793 - Debian - EN - iso-8859-1 Server IP address: 192.168.1.103 Perl Version: 5.8.8 i486-linux-gnu-thread-multi MySQL Version: 5.0.45-Debian_1ubuntu3.3 Platform Architecture: i686-linux
Created attachment 3144 [details] This is the cover.jpg generated by SqueezeCenter and displayed in the web interface. This is an invalid jpeg file.
Created attachment 3145 [details] This is the same file as cover.jpg with "FF" prepended -- notice it now works. I edited this using "hexer" and prepended "FF". It now works.
Created attachment 3146 [details] MP3 file containing an image which SqueezeCenter mangles This file contains an embedded JPEG image attached with EasyTAG 2.1.2. The image displays properly in EasyTag and in Rhythmbox, and if you look at the file in a binary editor, the image is intact within the MP3 file (with the proper header).
JPEG file format information from http://www.obrador.com/essentialjpeg/HeaderInfo.htm
I'll look at this one.
Fixed in 7.0 change 18132. The problem was we weren't correctly handling UTF8 encoding of the APIC frame, skipping an extra byte that we should only skip if the encoding is UTF16. There's another issue here which is we should really be using the second APIC image in this file (the cover, 0x03), but I'll file another bug for that.
Awesome, Thanks Andy! Is this committed in SVN?
(In reply to comment #7) > Awesome, Thanks Andy! Is this committed in SVN? > Duh. Found it. Thanks!
Verified to be working 7.0.1 - 19325
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1 Please try that version, if you still see the error, then reopen this bug. To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html
Reduce number of active targets for SC