tags: exif: Fix bug in inner ifd parsing
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Wed, 11 Aug 2010 11:47:57 +0000 (08:47 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Wed, 11 Aug 2010 11:55:59 +0000 (08:55 -0300)
Do not use the result of inner ifd's parsing to increment
the current tag index. The reasons are:

1) The function returns a boolean.
2) The inner ifd's tags are in a separate table, so they shouldn't
interfere with its parent ifd table parsing.

gst-libs/gst/tag/gstexiftag.c

index 2a688e5..3e75b53 100644 (file)
@@ -909,15 +909,18 @@ parse_exif_ifd (GstExifReader * exif_reader, gint buf_offset,
       continue;
     }
 
-    /* inner ifd tags handling */
+    /*
+     * inner ifd tags handling, errors processing those are being ignored
+     * and we try to continue the parsing
+     */
     if (tagdata.tag == EXIF_GPS_IFD_TAG) {
-      i += parse_exif_ifd (exif_reader,
+      parse_exif_ifd (exif_reader,
           tagdata.offset - exif_reader->base_offset, tag_map_gps);
 
       continue;
     }
     if (tagdata.tag == EXIF_IFD_TAG) {
-      i += parse_exif_ifd (exif_reader,
+      parse_exif_ifd (exif_reader,
           tagdata.offset - exif_reader->base_offset, tag_map_exif);
 
       continue;