diff src/exiv2.cc @ 1052:338c21c87ff5

Add support for GPSInfo - patch by Klaus Ethgen
author nadvornik
date Wed, 01 Oct 2008 20:57:56 +0000
parents 95c418661be8
children 77ca9a5d42be
line wrap: on
line diff
--- a/src/exiv2.cc	Mon Sep 29 21:17:19 2008 +0000
+++ b/src/exiv2.cc	Wed Oct 01 20:57:56 2008 +0000
@@ -512,11 +512,12 @@
 	}
 }
 
-ExifRational *exif_item_get_rational(ExifItem *item, gint *sign)
+ExifRational *exif_item_get_rational(ExifItem *item, gint *sign, gint n)
 {
 	try {
 		if (!item) return NULL;
-		Exiv2::Rational v = ((Exiv2::Metadatum *)item)->toRational();
+		if (n >= exif_item_get_elements(item)) return NULL;
+		Exiv2::Rational v = ((Exiv2::Metadatum *)item)->toRational(n);
 		static ExifRational ret;
 		ret.num = v.first;
 		ret.den = v.second;