summaryrefslogtreecommitdiff
path: root/src/photos
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-04-28 16:46:41 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-04-28 16:46:41 +0200
commit6d3354ff2e7ce13feeae1b75d94a186d86f82d89 (patch)
tree2d908584bfb663268004e19a23e02ce6c65034c5 /src/photos
parent6dd5e6966c6ec10d38d4b620a053ae262ac60d86 (diff)
parent7385922cd37e4ffe65f4af34b2795307a76670c4 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/photos')
-rw-r--r--src/photos/PhotoMetadata.vala11
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());
}