From adcb6e642dc9f3a1ebeee23387e3bed4f739f524 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 11 Aug 2010 08:47:57 -0300 Subject: [PATCH] tags: exif: Fix bug in inner ifd parsing 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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/tag/gstexiftag.c b/gst-libs/gst/tag/gstexiftag.c index 2a688e53f9..3e75b53b7d 100644 --- a/gst-libs/gst/tag/gstexiftag.c +++ b/gst-libs/gst/tag/gstexiftag.c @@ -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;