[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:37:32 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=670d622

The following commit has been merged in the master branch:
commit 670d622612b4f9c9c4e14690ddea2f276193c345
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sat Apr 29 02:59:35 2006 +0000

    New Tiff Parser: Fixed makernote implementation for cases where the makernote header cannot be parsed. Added Subifd found in Sony RAW files to the TIFF structure, but without any decoding support yet.
---
 src/makernote2.cpp    |  4 ++--
 src/makernote2.hpp    | 12 ++++++------
 src/mnreg.cpp         | 12 ++++++------
 src/nikonmn.cpp       |  1 +
 src/tiffcomposite.cpp |  5 +++++
 src/tiffparser.cpp    |  1 +
 src/tiffvisitor.cpp   | 15 ++++++++++-----
 src/tiffvisitor.hpp   | 12 +++++++++++-
 8 files changed, 42 insertions(+), 20 deletions(-)

diff --git a/src/makernote2.cpp b/src/makernote2.cpp
index 9820ec0..e8d9e91 100644
--- a/src/makernote2.cpp
+++ b/src/makernote2.cpp
@@ -93,9 +93,9 @@ namespace Exiv2 {
 
     void TiffIfdMakernote::doAccept(TiffVisitor& visitor)
     {
-        visitor.visitIfdMakernote(this);
+        if (visitor.go()) visitor.visitIfdMakernote(this);
         ifd_.accept(visitor);
-        visitor.visitIfdMakernoteEnd(this);
+        if (visitor.go()) visitor.visitIfdMakernoteEnd(this);
     }
 
 }                                       // namespace Exiv2
diff --git a/src/makernote2.hpp b/src/makernote2.hpp
index 94a5dc4..8b788b9 100644
--- a/src/makernote2.hpp
+++ b/src/makernote2.hpp
@@ -93,12 +93,12 @@ namespace Exiv2 {
                  is used to indicate this transfer here in order to reduce
                  file dependencies.
         */
-        static TiffComponent* create(uint16_t    tag,
-                                     uint16_t    group,
-                                     std::string make,
-                                     const byte* pData,
-                                     uint32_t    size,
-                                     ByteOrder   byteOrder);
+        static TiffComponent* create(uint16_t           tag,
+                                     uint16_t           group,
+                                     const std::string& make,
+                                     const byte*        pData,
+                                     uint32_t           size,
+                                     ByteOrder          byteOrder);
     protected:
         //! Prevent destruction (needed if used as a policy class)
         ~TiffMnCreator() {}
diff --git a/src/mnreg.cpp b/src/mnreg.cpp
index dcf04f9..0cf997d 100644
--- a/src/mnreg.cpp
+++ b/src/mnreg.cpp
@@ -59,12 +59,12 @@ namespace Exiv2 {
 
 
     // The find template needs to see the array from where it is called
-    TiffComponent* TiffMnCreator::create(uint16_t    tag,
-                                         uint16_t    group,
-                                         std::string make,
-                                         const byte* pData,
-                                         uint32_t    size,
-                                         ByteOrder   byteOrder)
+    TiffComponent* TiffMnCreator::create(uint16_t           tag,
+                                         uint16_t           group,
+                                         const std::string& make,
+                                         const byte*        pData,
+                                         uint32_t           size,
+                                         ByteOrder          byteOrder)
     {
         TiffComponent* tc = 0;
         const TiffMnRegistry* tmr = find(registry_, TiffMnRegistry::Key(make));
diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp
index ff72515..a7e7da4 100644
--- a/src/nikonmn.cpp
+++ b/src/nikonmn.cpp
@@ -613,6 +613,7 @@ namespace Exiv2 {
     // Roger Larsson: My guess is that focuspoints will follow autofocus sensor
     // module Note that relative size and position will vary depending on if
     // "wide" or not
+    //! Focus points for Nikon cameras
     const char *nikonFocuspoints[] = {
         "Center",
         "Top",
diff --git a/src/tiffcomposite.cpp b/src/tiffcomposite.cpp
index 9e7a113..390e99b 100644
--- a/src/tiffcomposite.cpp
+++ b/src/tiffcomposite.cpp
@@ -206,6 +206,11 @@ namespace Exiv2 {
     {
         visitor.visitMnEntry(this);
         if (mn_) mn_->accept(visitor);
+        if (!visitor.go()) {
+            delete mn_;
+            mn_ = 0;
+            visitor.setGo(true);
+        }
     } // TiffMnEntry::doAccept
 
     void TiffArrayEntry::doAccept(TiffVisitor& visitor)
diff --git a/src/tiffparser.cpp b/src/tiffparser.cpp
index ad11015..a4cec69 100644
--- a/src/tiffparser.cpp
+++ b/src/tiffparser.cpp
@@ -92,6 +92,7 @@ namespace Exiv2 {
         { Tag::root, Group::none, newTiffDirectory, Group::ifd0 },
         {    0x8769, Group::ifd0, newTiffSubIfd,    Group::exif },
         {    0x8825, Group::ifd0, newTiffSubIfd,    Group::gps  },
+        {    0x014a, Group::ifd0, newTiffSubIfd,    Group::ignr },
         {    0xa005, Group::exif, newTiffSubIfd,    Group::iop  },
         {    0x927c, Group::exif, newTiffMnEntry,   Group::mn   },
         {    0x0201, Group::ifd1, newTiffThumbData, Group::ifd1 },
diff --git a/src/tiffvisitor.cpp b/src/tiffvisitor.cpp
index b76a35b..5e444dd 100644
--- a/src/tiffvisitor.cpp
+++ b/src/tiffvisitor.cpp
@@ -579,10 +579,15 @@ namespace Exiv2 {
 #ifndef SUPPRESS_WARNINGS
             std::cerr << "Error: Failed to read " 
                       << object->ifd_.groupName() 
-                      << " (" << object->ifd_.group() 
-                      << ") IFD Makernote header.
";
-#endif
-            return;   // todo: signal error to parent, delete object
+                      << " IFD Makernote header.
";
+#ifdef DEBUG
+            if (static_cast<uint32_t>(pLast_ - object->start()) >= 16) {
+                hexdump(std::cerr, object->start(), 16);
+            }
+#endif // DEBUG
+#endif // SUPPRESS_WARNINGS
+            setGo(false);
+            return;
         }
         // Modify reader for Makernote peculiarities, byte order, offset,
         // component factory
@@ -596,7 +601,7 @@ namespace Exiv2 {
     {
         // Reset state (byte order, create function, offset) back to that
         // for the image
-        resetState();        
+        resetState();
     } // TiffReader::visitIfdMakernoteEnd
 
     void TiffReader::readTiffEntry(TiffEntryBase* object)
diff --git a/src/tiffvisitor.hpp b/src/tiffvisitor.hpp
index 2ab8a4b..b058016 100644
--- a/src/tiffvisitor.hpp
+++ b/src/tiffvisitor.hpp
@@ -80,7 +80,17 @@ namespace Exiv2 {
 
         //! @name Manipulators
         //@{
-        //! Set the stop/go flag: true for go, false for stop
+        /*!
+          @brief Set the stop/go flag: true for go, false for stop.
+
+          This mechanism can be used by concrete visitors to signal certain
+          events. For example, TiffFinder sets the stop flag as soon as it finds
+          the correct component to signal to that the search should be
+          stopped. TiffReader uses it to signal problems reading a makernote.
+          As the flag doesn't carry any information on the type of event which
+          triggered it, it is for each visitor to establish and adhere to
+          conventions about its meaning.
+         */
         void setGo(bool go) { go_ = go; }
         //! Operation to perform for a TIFF entry
         virtual void visitEntry(TiffEntry* object) =0;

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list