Fix IFD linking in EXIF creation

The original version of create_EXIF_internal uses continutation
to link the thumbnail IFD to Exif IFD. The Android version tries to
explicitly gives the TAG_EXIF_OFFSET value for the thumbnail IFD.
However, there were some holes left from the original implementation.

Fixes:
1. Explicitly mark the end of the main EXIF section since we are not using
continuation to connect to thumbnail IFD.
2. Overwrite value of TAG_EXIF_OFFSET when we get to the thumbnail section.
The first write for the value of TAG_EXIF_OFFSET relies on some calculation
which is prone to be wrong. We can simply overwrite the value here with the
proper value.

Change-Id: I12d3fbcf10ad30b9520d7fcbdb9b16a61e91641a
Signed-off-by: Tyler Luu <tluu@ti.com>
1 file changed