diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-11-21 18:12:55 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-11-21 18:12:55 +0100 |
commit | ad55a11967171d53635e48c111f8c054ad799f9a (patch) | |
tree | 21565cf15d6e92d6c95f5e6318006078fe2e067d /src | |
parent | 3357ed0d4ffab468730c68ae9e4544209fc2eda2 (diff) | |
download | pyexiv2-ad55a11967171d53635e48c111f8c054ad799f9a.tar.gz |
Use the typename from the XMP datum when available
instead of relying on the static type information, that may be incomplete.
Diffstat (limited to 'src')
-rw-r--r-- | src/exiv2wrapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp index d217144..a5ae4aa 100644 --- a/src/exiv2wrapper.cpp +++ b/src/exiv2wrapper.cpp @@ -749,14 +749,14 @@ XmpTag::XmpTag(const std::string& key, Exiv2::Xmpdatum* datum): _key(key) if (_from_datum) { _datum = datum; + _exiv2_type = datum->typeName(); } else { _datum = new Exiv2::Xmpdatum(_key); + _exiv2_type = Exiv2::TypeInfo::typeName(Exiv2::XmpProperties::propertyType(_key)); } - _exiv2_type = Exiv2::TypeInfo::typeName(Exiv2::XmpProperties::propertyType(_key)); - const char* title = Exiv2::XmpProperties::propertyTitle(_key); if (title != 0) { |