[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:45:53 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=c6ed7df
The following commit has been merged in the master branch:
commit c6ed7dfe35bb2326cb44b0b0377c510ba27032cf
Author: Robin Mills <robin at clanmills.com>
Date: Fri Nov 13 19:32:46 2015 +0000
#816 Correction to r4018 to deal with segmentation fault on test file _IGP9034.JPG
---
src/pentaxmn.cpp | 44 +++++++++++++++++++++++---------------------
test/bugfixes-test.sh | 8 ++++----
test/data/bugfixes-test.out | Bin 1842806 -> 1843444 bytes
test/data/exiv2-bug816c.exv | Bin 0 -> 60025 bytes
test/data/exiv2-bug816d.exv | Bin 0 -> 30113 bytes
5 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/src/pentaxmn.cpp b/src/pentaxmn.cpp
index 96fd6b9..3c3276f 100644
--- a/src/pentaxmn.cpp
+++ b/src/pentaxmn.cpp
@@ -1152,37 +1152,39 @@ namespace Exiv2 {
const ExifData* metadata)
{
try {
- unsigned long lensID = value.toLong(0)*256 + value.toLong(1);
- unsigned long index = 0;
+ unsigned long lensID = value.toLong(0)*256 + value.toLong(1); // 0x3ff
+ unsigned long index = 0;
+
+ const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo")) != metadata->end()
+ ? metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo"))
+ : metadata->findKey(ExifKey("Exif.Pentax.LensInfo"))
+ ;
+ if ( lensInfo == metadata->end() ) return EXV_PRINT_COMBITAG_MULTI(pentaxLensType, 2, 1, 2)(os, value, metadata);
+ if ( lensInfo->count() < 5 ) return EXV_PRINT_COMBITAG_MULTI(pentaxLensType, 2, 1, 2)(os, value, metadata);
if ( value.count() == 2 ) {
- // http://dev.exiv2.org/attachments/download/326/IMGP4432.PEF
- // exiv2 -pv --grep Lens ~/Downloads/IMGP4432.PEF
+ // http://dev.exiv2.org/attachments/download/326/IMGP4432.PEF
+ // exiv2 -pv --grep Lens ~/Downloads/IMGP4432.PEF
// 0x003f Pentax LensType Byte 2 3 255
// 0x0207 Pentax LensInfo Undefined 36 3 255 0 0 40 148 71 152 80 6 241 65 237 153 88 36 1 76 107 251 255 255 255 0 0 80 6 241 0 0 0 0 0 0 0 0
- unsigned long base = 1;
+ unsigned long base = 1;
- // http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html#LensData
- const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.Pentax.LensInfo"));
- if ( lensInfo->count() > 5 ) {
- unsigned int autoAperture = lensInfo->toLong(base+1) & 0x01 ;
- unsigned int minAperture = lensInfo->toLong(base+2) & 0x06 ;
- unsigned int minFocusDistance = lensInfo->toLong(base+3) & 0xf8 ;
- unsigned int dontKnow = lensInfo->toLong(base+4);
+ // http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html#LensData
+ const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.Pentax.LensInfo"));
+ unsigned int autoAperture = lensInfo->toLong(base+1) & 0x01 ;
+ unsigned int minAperture = lensInfo->toLong(base+2) & 0x06 ;
+ unsigned int minFocusDistance = lensInfo->toLong(base+3) & 0xf8 ;
+ unsigned int dontKnow = lensInfo->toLong(base+4);
- if ( autoAperture == 0x0 && minAperture == 0x0 && minFocusDistance == 0x28 && dontKnow == 148) index = 8;
- }
- } else if ( value.count() == 3 ) {
- // http://dev.exiv2.org/attachments/download/858/_IGP9032.DNG
+ if ( autoAperture == 0x0 && minAperture == 0x0 && minFocusDistance == 0x28 && dontKnow == 148) index = 8;
+ } else if ( value.count() == 3 ) {
+ // http://dev.exiv2.org/attachments/download/858/_IGP9032.DNG
// $ exiv2 -pv --grep Lens ~/Downloads/_IGP9032.DNG
// 0x003f PentaxDng LensType Byte 3 3 255 0
// 0x0207 PentaxDng LensInfo Undefined 69 131 0 0 255 0 40 148 68 244 ...
// 0 1 2 3 4 5 6
- const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo"));
- if ( lensInfo->count() > 5 ) {
- if ( lensInfo->toLong(4) == 0 && lensInfo->toLong(5) == 40 && lensInfo->toLong(6) == 148 ) index = 8;
- }
- }
+ if ( lensInfo->toLong(4) == 0 && lensInfo->toLong(5) == 40 && lensInfo->toLong(6) == 148 ) index = 8;
+ }
if ( index > 0 ) {
const TagDetails* td = find(pentaxLensType, lensID);
diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh
index efc1963..921e4c7 100755
--- a/test/bugfixes-test.sh
+++ b/test/bugfixes-test.sh
@@ -222,10 +222,10 @@ source ./functions.source
num=816 # test Camera: Pentax + Lens:Sigma 55-200mm F4-5.6 DC is correctly reported
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
- for X in a b; do
- file=exiv2-bug${num}${X}.exv
- copyTestFile $file
- runTest exiv2 -pa --grep Lens $file
+ for X in a b c d; do
+ filename=exiv2-bug${num}${X}.exv
+ copyTestFile $filename
+ runTest exiv2 -pa --grep Lens $filename
done
num=831
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index 66f4528..7f73839 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
diff --git a/test/data/exiv2-bug816c.exv b/test/data/exiv2-bug816c.exv
new file mode 100644
index 0000000..d21058d
Binary files /dev/null and b/test/data/exiv2-bug816c.exv differ
diff --git a/test/data/exiv2-bug816d.exv b/test/data/exiv2-bug816d.exv
new file mode 100644
index 0000000..cd66244
Binary files /dev/null and b/test/data/exiv2-bug816d.exv differ
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list