summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Crain <jason@inspiresomeone.us>2017-02-23 22:10:50 -0600
committerJason Crain <jason@inspiresomeone.us>2017-02-24 21:40:14 -0600
commit8b4990e38d419fedbcd3be77dbb75ab601effdfb (patch)
tree50cd6e93ec2b5b6e56329a67ad8c0497311db8b0
parente4abbec1e342f7f64da69e04c925934c03dfbd6c (diff)
Add patch 0004-get_orientation-Fix-abort-on-Minolta-meta-data.patch.
Fixes an assertion when processing metadata from a not-rotated image from Minolta cameras. Closes: 856101
-rw-r--r--debian/patches/0004-get_orientation-Fix-abort-on-Minolta-meta-data.patch57
-rw-r--r--debian/patches/series1
2 files changed, 58 insertions, 0 deletions
diff --git a/debian/patches/0004-get_orientation-Fix-abort-on-Minolta-meta-data.patch b/debian/patches/0004-get_orientation-Fix-abort-on-Minolta-meta-data.patch
new file mode 100644
index 0000000..e1050ba
--- /dev/null
+++ b/debian/patches/0004-get_orientation-Fix-abort-on-Minolta-meta-data.patch
@@ -0,0 +1,57 @@
+From: Jens Georg <mail@jensge.org>
+Date: Sun, 18 Dec 2016 17:02:42 +0100
+Subject: get_orientation: Fix abort on Minolta meta-data
+
+Properly handle rotation value 72 (not rotated)
+
+Origin: upstream, https://git.gnome.org/browse/gexiv2/commit/?id=6810c92d7b2978f97ac9750ddf8a6a62b44be4cc
+Bug: https://bugzilla.gnome.org/776233
+Bug-Redhat: https://bugzilla.redhat.com/1401706
+Bug-Debian: https://bugs.debian.org/856101
+Last-Update: 2017-02-23
+---
+ gexiv2/gexiv2-metadata.cpp | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/gexiv2/gexiv2-metadata.cpp b/gexiv2/gexiv2-metadata.cpp
+index 8aa4d45..7d1be08 100644
+--- a/gexiv2/gexiv2-metadata.cpp
++++ b/gexiv2/gexiv2-metadata.cpp
+@@ -395,26 +395,31 @@ GExiv2Orientation gexiv2_metadata_get_orientation (GExiv2Metadata *self) {
+ // Because some camera set a wrong standard exif orientation tag,
+ // We need to check makernote tags first!
+ if (gexiv2_metadata_has_exif_tag(self, "Exif.MinoltaCs7D.Rotation")) {
+- switch (gexiv2_metadata_get_exif_tag_long(self, "Exif.MinoltaCs7D.Rotation")) {
++ long orientation = gexiv2_metadata_get_exif_tag_long(self, "Exif.MinoltaCs7D.Rotation");
++ switch (orientation) {
+ case 76:
+ return GEXIV2_ORIENTATION_ROT_90;
+-
+ case 82:
+ return GEXIV2_ORIENTATION_ROT_270;
++ case 72:
++ return GEXIV2_ORIENTATION_UNSPECIFIED;
+ default:
+- g_assert_not_reached();
++ g_debug ("Unknown Minolta rotation value %ld, ignoring", orientation);
+ }
+ }
+-
++
+ if (gexiv2_metadata_has_exif_tag(self, "Exif.MinoltaCs5D.Rotation")) {
+- switch (gexiv2_metadata_get_exif_tag_long(self, "Exif.MinoltaCs5D.Rotation")) {
++ long orientation = gexiv2_metadata_get_exif_tag_long(self, "Exif.MinoltaCs5D.Rotation");
++ switch (orientation) {
+ case 76:
+ return GEXIV2_ORIENTATION_ROT_90;
+
+ case 82:
+ return GEXIV2_ORIENTATION_ROT_270;
++ case 72:
++ return GEXIV2_ORIENTATION_UNSPECIFIED;
+ default:
+- g_assert_not_reached();
++ g_debug ("Unknown Minolta rotation value %ld, ignoring", orientation);
+ }
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index ff638d2..37ff881 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
exiv2_pc.patch
fix-typelib-install-directory.patch
always-install-vapi-file.patch
+0004-get_orientation-Fix-abort-on-Minolta-meta-data.patch