jaeguly / mp4v2

Automatically exported from code.google.com/p/mp4v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

GoogleCodeExporter opened this issue · comments

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

could you give me a file to test with?

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

  • Changed state: Accepted
You can grab some at http://www.exif.org/samples.html


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

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

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

Fixed in r502--thanks.

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

  • Changed state: Fixed