diff options
Diffstat (limited to 'src/photos')
-rw-r--r-- | src/photos/PhotoMetadata.vala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/photos/PhotoMetadata.vala b/src/photos/PhotoMetadata.vala index 2c2d6c5..288a362 100644 --- a/src/photos/PhotoMetadata.vala +++ b/src/photos/PhotoMetadata.vala @@ -70,6 +70,8 @@ public class ACDSeeKeywordTransformer : KeywordTransformer { } public override Gee.List<string> transform (string input) throws Error { + this.stack.clear(); + this.result.clear(); var ctx = new MarkupParseContext (this.parser, 0, this, null); ctx.parse (input, input.length); @@ -276,7 +278,11 @@ public class PhotoMetadata : MediaMetadata { exiv2 = new GExiv2.Metadata(); exif = null; +#if NEW_GEXIV2_API + exiv2.open_buf(buffer[0:length]); +#else exiv2.open_buf(buffer, length); +#endif exif = Exif.Data.new_from_data(buffer, length); source_name = "<memory buffer %d bytes>".printf(length); } @@ -285,8 +291,11 @@ public class PhotoMetadata : MediaMetadata { exiv2 = new GExiv2.Metadata(); exif = null; - exiv2.from_app1_segment(buffer.get_data(), (long) buffer.get_size()); +#if NEW_GEXIV2_API + exiv2.from_app1_segment(buffer.get_data()); +#else exif = Exif.Data.new_from_data(buffer.get_data(), buffer.get_size()); +#endif source_name = "<app1 segment %zu bytes>".printf(buffer.get_size()); } |