commit bed262a4426850875f0e3abb5db1133d22691ee2
Author: Executive <manager@solarbeam.pt>
Date:   Wed Mar 23 17:17:03 2016 +0000

    Corrected exif ISO tag intepretation.
    modified:   gst-libs/gst/tag/gstexiftag.c

diff --git a/gst-libs/gst/tag/gstexiftag.c b/gst-libs/gst/tag/gstexiftag.c
index 1f0528e..fa5822b 100644
--- a/gst-libs/gst/tag/gstexiftag.c
+++ b/gst-libs/gst/tag/gstexiftag.c
@@ -373,13 +373,12 @@ static const GstExifTagMatch tag_map_exif[] = {
 
   /* don't need the serializer as we always write the iso speed alone */
   {GST_TAG_CAPTURING_ISO_SPEED, EXIF_TAG_PHOTOGRAPHIC_SENSITIVITY,
-        EXIF_TYPE_SHORT, 0, NULL,
-      deserialize_add_to_pending_tags},
+      EXIF_TYPE_SHORT, 0, NULL, NULL},
 
   {GST_TAG_CAPTURING_ISO_SPEED, EXIF_TAG_SENSITIVITY_TYPE, EXIF_TYPE_SHORT, 0,
       serialize_sensitivity_type, deserialize_sensitivity_type},
   {GST_TAG_CAPTURING_ISO_SPEED, EXIF_TAG_ISO_SPEED, EXIF_TYPE_LONG, 0, NULL,
-      NULL},
+      deserialize_add_to_pending_tags},
   {NULL, EXIF_VERSION_TAG, EXIF_TYPE_UNDEFINED, 0, NULL, NULL},
   {GST_TAG_DATE_TIME, EXIF_TAG_DATE_TIME_ORIGINAL, EXIF_TYPE_ASCII, 0, NULL,
       NULL},
@@ -1314,6 +1313,27 @@ parse_exif_ascii_tag (GstExifReader * reader, const GstExifTagMatch * tag,
 }
 
 static void
+parse_exif_short_tag (GstExifReader * reader, const GstExifTagMatch * tag,
+    guint32 count, guint32 offset, const guint8 * offset_as_data)
+{
+  GType tagtype;
+
+  if (count > 1) {
+    GST_WARNING ("Short tags with more than one value are not supported");
+    return;
+  }
+
+  tagtype = gst_tag_get_type (tag->gst_tag);
+  if (tagtype == G_TYPE_INT) {
+    gst_tag_list_add (reader->taglist, GST_TAG_MERGE_REPLACE, tag->gst_tag,
+        offset, NULL);
+  } else {
+    GST_WARNING ("No parsing function associated to %x(%s)", tag->exif_tag,
+        tag->gst_tag);
+  }
+}
+
+static void
 parse_exif_long_tag (GstExifReader * reader, const GstExifTagMatch * tag,
     guint32 count, guint32 offset, const guint8 * offset_as_data)
 {
@@ -1755,6 +1775,10 @@ parse_exif_ifd (GstExifReader * exif_reader, gint buf_offset,
         parse_exif_rational_tag (exif_reader, tag_map[map_index].gst_tag,
             tagdata.count, tagdata.offset, 1, TRUE);
         break;
+      case EXIF_TYPE_SHORT:
+        parse_exif_short_tag (exif_reader, &tag_map[map_index],
+            tagdata.count, tagdata.offset, tagdata.offset_as_data);
+        break;
       case EXIF_TYPE_UNDEFINED:
         parse_exif_undefined_tag (exif_reader, &tag_map[map_index],
             tagdata.count, tagdata.offset, tagdata.offset_as_data);
