summaryrefslogtreecommitdiff
path: root/src/photos
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-07-12 16:16:34 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-07-12 16:16:34 +0200
commite905afb102569e93e2f6ece9a9ab515ac1fd4f04 (patch)
tree56c764f3a3fe3848ef2aa161d143f33cb2eaeb8e /src/photos
parent71137cc5832110d91599d68790402cf196762ed3 (diff)
parentcb774d1baf242adcc03a1df5eed6d100f7e3bd55 (diff)
Merge branch 'release/debian/0.30.4-1'debian/0.30.4-1
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());
}