jaeguly / mp4v2

Automatically exported from code.google.com/p/mp4v2
Other
0 stars 0 forks source link

JPEG image type checking is too strict; EXIF is not interpreted as JPEG (itmf/type.cpp) #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the IMAGE_HEADERS[] array, JPEG is assumed to be in JFIF container with APP1 
marker "\xff\xe0".
However, since EXIF uses different APP1 marker "\xff\xe1", EXIF file is not 
interpreted as JPEG file.

Original issue reported on code.google.com by honeycom...@gmail.com on 1 Nov 2012 at 3:54

GoogleCodeExporter commented 9 years ago
could you give me a file to test with?

Original comment by kid...@gmail.com on 18 Nov 2012 at 6:09

GoogleCodeExporter commented 9 years ago
You can grab some at http://www.exif.org/samples.html

Original comment by honeycom...@gmail.com on 21 Nov 2012 at 12:39

GoogleCodeExporter commented 9 years ago
I think I understand the issue somewhat; you wouldn't happen to have a patch I 
could look at more closely?

Original comment by kid...@gmail.com on 28 Dec 2012 at 4:51

GoogleCodeExporter commented 9 years ago
Oh, sorry. I thought you just need an EXIF image to reproduce/test the issue.
Patching it is trivial.
Just change IMAGE_HEADERS[] array in itmf/type.cpp like the following:
-        { BT_JPEG, "\xff\xd8\xff\xe0" },
+        { BT_JPEG, "\xff\xd8\xff" },

Original comment by honeycom...@gmail.com on 29 Dec 2012 at 1:45

GoogleCodeExporter commented 9 years ago
Fixed in r502--thanks.

Original comment by kid...@gmail.com on 13 May 2013 at 3:33