exiftool-vendored.pl 12.60.0 → 12.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/Changes +110 -0
- package/bin/LICENSE +674 -0
- package/bin/MANIFEST +11 -0
- package/bin/META.json +5 -3
- package/bin/META.yml +5 -3
- package/bin/Makefile.PL +7 -1
- package/bin/README +50 -45
- package/bin/config_files/guano.config +161 -0
- package/bin/exiftool +163 -103
- package/bin/lib/Image/ExifTool/7Z.pm +793 -0
- package/bin/lib/Image/ExifTool/Apple.pm +14 -7
- package/bin/lib/Image/ExifTool/BMP.pm +0 -1
- package/bin/lib/Image/ExifTool/BigTIFF.pm +8 -1
- package/bin/lib/Image/ExifTool/BuildTagLookup.pm +4 -4
- package/bin/lib/Image/ExifTool/Canon.pm +4 -1
- package/bin/lib/Image/ExifTool/CanonRaw.pm +4 -4
- package/bin/lib/Image/ExifTool/CanonVRD.pm +4 -1
- package/bin/lib/Image/ExifTool/Exif.pm +31 -14
- package/bin/lib/Image/ExifTool/FlashPix.pm +9 -2
- package/bin/lib/Image/ExifTool/FujiFilm.pm +3 -3
- package/bin/lib/Image/ExifTool/GPS.pm +5 -2
- package/bin/lib/Image/ExifTool/Geotag.pm +4 -1
- package/bin/lib/Image/ExifTool/Jpeg2000.pm +243 -20
- package/bin/lib/Image/ExifTool/Lang/fr.pm +1467 -202
- package/bin/lib/Image/ExifTool/MPF.pm +2 -1
- package/bin/lib/Image/ExifTool/Matroska.pm +16 -1
- package/bin/lib/Image/ExifTool/MinoltaRaw.pm +2 -2
- package/bin/lib/Image/ExifTool/Nikon.pm +941 -33
- package/bin/lib/Image/ExifTool/NikonCustom.pm +874 -63
- package/bin/lib/Image/ExifTool/PDF.pm +39 -12
- package/bin/lib/Image/ExifTool/PLIST.pm +8 -1
- package/bin/lib/Image/ExifTool/PNG.pm +6 -6
- package/bin/lib/Image/ExifTool/PhaseOne.pm +5 -5
- package/bin/lib/Image/ExifTool/QuickTime.pm +96 -32
- package/bin/lib/Image/ExifTool/QuickTimeStream.pl +68 -37
- package/bin/lib/Image/ExifTool/README +2 -2
- package/bin/lib/Image/ExifTool/RIFF.pm +11 -9
- package/bin/lib/Image/ExifTool/Samsung.pm +227 -227
- package/bin/lib/Image/ExifTool/Shortcuts.pm +2 -1
- package/bin/lib/Image/ExifTool/SigmaRaw.pm +4 -4
- package/bin/lib/Image/ExifTool/Sony.pm +237 -32
- package/bin/lib/Image/ExifTool/TagLookup.pm +4762 -4629
- package/bin/lib/Image/ExifTool/TagNames.pod +737 -20
- package/bin/lib/Image/ExifTool/Validate.pm +17 -1
- package/bin/lib/Image/ExifTool/WPG.pm +296 -0
- package/bin/lib/Image/ExifTool/WriteExif.pl +9 -7
- package/bin/lib/Image/ExifTool/WritePDF.pl +7 -8
- package/bin/lib/Image/ExifTool/WriteQuickTime.pl +21 -9
- package/bin/lib/Image/ExifTool/WriteXMP.pl +2 -2
- package/bin/lib/Image/ExifTool/Writer.pl +47 -16
- package/bin/lib/Image/ExifTool/XMP.pm +30 -6
- package/bin/lib/Image/ExifTool/XMP2.pl +32 -0
- package/bin/lib/Image/ExifTool/XMPStruct.pl +96 -28
- package/bin/lib/Image/ExifTool/ZIP.pm +159 -41
- package/bin/lib/Image/ExifTool.pm +280 -164
- package/bin/lib/Image/ExifTool.pod +117 -52
- package/bin/perl-Image-ExifTool.spec +44 -43
- package/bin/pp_build_exe.args +8 -4
- package/package.json +3 -3
|
@@ -28,7 +28,7 @@ sub Process360Fly($$$);
|
|
|
28
28
|
sub ProcessFMAS($$$);
|
|
29
29
|
sub ProcessCAMM($$$);
|
|
30
30
|
|
|
31
|
-
my $debug; # set to
|
|
31
|
+
my $debug; # set to 'tEST' (all caps) for extra debugging messages
|
|
32
32
|
|
|
33
33
|
# QuickTime data types that have ExifTool equivalents
|
|
34
34
|
# (ref https://developer.apple.com/library/content/documentation/QuickTime/QTFF/Metadata/Metadata.html#//apple_ref/doc/uid/TP40000939-CH1-SW35)
|
|
@@ -89,6 +89,7 @@ my %insvDataLen = (
|
|
|
89
89
|
0x600 => 8, # timestamps (ref 6)
|
|
90
90
|
0x700 => 53, # GPS
|
|
91
91
|
# 0x900 => 48, # ? (Insta360 X3)
|
|
92
|
+
# 0xa00 => 5?, # ? (Insta360 ONE RS)
|
|
92
93
|
# 0xb00 => 10, # ? (Insta360 X3)
|
|
93
94
|
);
|
|
94
95
|
|
|
@@ -1127,13 +1128,14 @@ sub Process_text($$$;$)
|
|
|
1127
1128
|
# Inputs: 0) ExifTool ref
|
|
1128
1129
|
# Notes: Also accesses ExifTool RAF*, SET_GROUP1, HandlerType, MetaFormat,
|
|
1129
1130
|
# ee*, and avcC elements (* = must exist)
|
|
1130
|
-
# - may be called either due to ExtractEmbedded option, or
|
|
1131
|
-
# -
|
|
1131
|
+
# - may be called either due to ExtractEmbedded option, or ImageDataHash requested
|
|
1132
|
+
# - hash includes only video and audio data
|
|
1132
1133
|
sub ProcessSamples($)
|
|
1133
1134
|
{
|
|
1134
1135
|
my $et = shift;
|
|
1135
1136
|
my ($raf, $ee) = @$et{qw(RAF ee)};
|
|
1136
|
-
my ($i, $buff, $pos, $hdrLen, $hdrFmt, @time, @dur, $oldIndent, $
|
|
1137
|
+
my ($i, $buff, $pos, $hdrLen, $hdrFmt, @time, @dur, $oldIndent, $hash);
|
|
1138
|
+
my ($mdatOffset, $mdatSize); # (for range-checking samples when hash is done)
|
|
1137
1139
|
|
|
1138
1140
|
return unless $ee;
|
|
1139
1141
|
delete $$et{ee}; # use only once
|
|
@@ -1142,22 +1144,22 @@ sub ProcessSamples($)
|
|
|
1142
1144
|
my $type = $$et{HandlerType} || '';
|
|
1143
1145
|
if ($type eq 'vide') {
|
|
1144
1146
|
# only process specific types of video streams
|
|
1145
|
-
$
|
|
1147
|
+
$hash = $$et{ImageDataHash};
|
|
1146
1148
|
# only process specific video types if ExtractEmbedded was used
|
|
1147
|
-
# (otherwise we are only here to calculate the audio/video
|
|
1149
|
+
# (otherwise we are only here to calculate the audio/video hash)
|
|
1148
1150
|
if ($eeOpt) {
|
|
1149
1151
|
if ($$ee{avcC}) { $type = 'avcC' }
|
|
1150
1152
|
elsif ($$ee{JPEG}) { $type = 'JPEG' }
|
|
1151
|
-
else { return unless $
|
|
1153
|
+
else { return unless $hash }
|
|
1152
1154
|
}
|
|
1153
1155
|
} elsif ($type eq 'soun') {
|
|
1154
|
-
$
|
|
1155
|
-
return unless $
|
|
1156
|
+
$hash = $$et{ImageDataHash};
|
|
1157
|
+
return unless $hash;
|
|
1156
1158
|
} else {
|
|
1157
|
-
return unless $eeOpt; # (don't do
|
|
1159
|
+
return unless $eeOpt; # (don't do hash on other types)
|
|
1158
1160
|
}
|
|
1159
1161
|
|
|
1160
|
-
my $
|
|
1162
|
+
my $hashSize = 0;
|
|
1161
1163
|
my ($start, $size) = @$ee{qw(start size)};
|
|
1162
1164
|
#
|
|
1163
1165
|
# determine sample start offsets from chunk offsets (stco) and sample-to-chunk table (stsc),
|
|
@@ -1211,7 +1213,7 @@ Sample: for ($i=0; ; ) {
|
|
|
1211
1213
|
++$iChunk;
|
|
1212
1214
|
}
|
|
1213
1215
|
@$start == @$size or $et->WarnOnce('Incorrect sample start/size count'), return;
|
|
1214
|
-
# process as chunks if we are only interested in calculating
|
|
1216
|
+
# process as chunks if we are only interested in calculating hash
|
|
1215
1217
|
if ($type eq 'soun' or $type eq 'vide') {
|
|
1216
1218
|
$start = $stco;
|
|
1217
1219
|
$size = \@chunkSize;
|
|
@@ -1230,6 +1232,10 @@ Sample: for ($i=0; ; ) {
|
|
|
1230
1232
|
$oldIndent = $$et{INDENT};
|
|
1231
1233
|
$$et{INDENT} = '';
|
|
1232
1234
|
}
|
|
1235
|
+
if ($hash) {
|
|
1236
|
+
$mdatSize = $$et{MediaDataSize};
|
|
1237
|
+
$mdatOffset = $$et{MediaDataOffset} if defined $mdatSize;
|
|
1238
|
+
}
|
|
1233
1239
|
# get required information from avcC box if parsing video data
|
|
1234
1240
|
if ($type eq 'avcC') {
|
|
1235
1241
|
$hdrLen = (Get8u(\$$ee{avcC}, 4) & 0x03) + 1;
|
|
@@ -1243,13 +1249,28 @@ Sample: for ($i=0; ; ) {
|
|
|
1243
1249
|
delete $$et{FoundGPSLatitude};
|
|
1244
1250
|
delete $$et{FoundGPSDateTime};
|
|
1245
1251
|
|
|
1246
|
-
#
|
|
1252
|
+
# range check the sample data for hash if necessary
|
|
1247
1253
|
my $size = $$size[$i];
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1254
|
+
if (defined $mdatOffset) {
|
|
1255
|
+
if ($$start[$i] < $mdatOffset) {
|
|
1256
|
+
$et->Warn("Sample $i for '${type}' data is before start of mdat");
|
|
1257
|
+
} elsif ($$start[$i] + $size > $mdatOffset + $mdatSize) {
|
|
1258
|
+
$et->Warn("Sample $i for '${type}' data runs off end of mdat");
|
|
1259
|
+
$size = $mdatOffset + $mdatSize - $$start[$i];
|
|
1260
|
+
$size = 0 if $size < 0;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
# read the sample data
|
|
1264
|
+
$raf->Seek($$start[$i], 0) or $et->WarnOnce("Seek error in $type data"), next;
|
|
1265
|
+
my $n = $raf->Read($buff, $size);
|
|
1266
|
+
unless ($n == $size) {
|
|
1267
|
+
$et->WarnOnce("Error reading $type data");
|
|
1268
|
+
next unless $n;
|
|
1269
|
+
$size = $n;
|
|
1270
|
+
}
|
|
1271
|
+
if ($hash) {
|
|
1272
|
+
$hash->add($buff);
|
|
1273
|
+
$hashSize += length $buff;
|
|
1253
1274
|
}
|
|
1254
1275
|
if ($type eq 'avcC') {
|
|
1255
1276
|
next if length($buff) <= $hdrLen;
|
|
@@ -1357,7 +1378,7 @@ Sample: for ($i=0; ; ) {
|
|
|
1357
1378
|
DataPos => $$start[$i],
|
|
1358
1379
|
SampleTime => $time[$i],
|
|
1359
1380
|
SampleDuration => $dur[$i],
|
|
1360
|
-
}, $tagTbl)
|
|
1381
|
+
}, $tagTbl);
|
|
1361
1382
|
}
|
|
1362
1383
|
|
|
1363
1384
|
} elsif ($$tagTbl{$type}) {
|
|
@@ -1378,7 +1399,7 @@ Sample: for ($i=0; ; ) {
|
|
|
1378
1399
|
}
|
|
1379
1400
|
if ($verbose) {
|
|
1380
1401
|
my $str = $type eq 'soun' ? 'Audio' : 'Video';
|
|
1381
|
-
$et->VPrint(0, "$$et{INDENT}(
|
|
1402
|
+
$et->VPrint(0, "$$et{INDENT}(ImageDataHash: $hashSize bytes of $str data)\n") if $hashSize;
|
|
1382
1403
|
$$et{INDENT} = $oldIndent;
|
|
1383
1404
|
$et->VPrint(0, "--------------------------\n");
|
|
1384
1405
|
}
|
|
@@ -1455,16 +1476,15 @@ sub ProcessFreeGPS($$$)
|
|
|
1455
1476
|
$et->VerboseDump(\$buf2);
|
|
1456
1477
|
}
|
|
1457
1478
|
# (extract longitude as 9 digits, not 8, ref PH)
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
push @xtra, UserLabel => $lbl if length $lbl;
|
|
1479
|
+
if ($buf2 =~ /^.{8}(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2}).(.{15})([NS])(\d{8})([EW])(\d{9})(\d{8})?/s) {
|
|
1480
|
+
($yr,$mon,$day,$hr,$min,$sec,$lbl,$latRef,$lat,$lonRef,$lon,$spd) = ($1,$2,$3,$4,$5,$6,$7,$8,$9/1e4,$10,$11/1e4,$12);
|
|
1481
|
+
if (defined $spd) { # (Azdome)
|
|
1482
|
+
$spd += 0; # remove leading 0's
|
|
1483
|
+
} elsif ($buf2 =~ /^.{57}([-+]\d{4})(\d{3})/s) { # (EEEkit)
|
|
1484
|
+
# $alt = $1 + 0; (doesn't look right for my sample, but the Ambarella A12 text has this)
|
|
1485
|
+
$spd = $2 + 0;
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1468
1488
|
# extract accelerometer data (ref PH)
|
|
1469
1489
|
if ($buf2 =~ /^.{65}(([-+]\d{3})([-+]\d{3})([-+]\d{3})([-+]\d{3})*)/s) {
|
|
1470
1490
|
$_ = $1;
|
|
@@ -1472,7 +1492,15 @@ sub ProcessFreeGPS($$$)
|
|
|
1472
1492
|
s/([-+])/ $1/g; s/^ //;
|
|
1473
1493
|
push @xtra, AccelerometerData => $_;
|
|
1474
1494
|
} elsif ($buf2 =~ /^.{173}([-+]\d{3})([-+]\d{3})([-+]\d{3})/s) { # (Azdome)
|
|
1495
|
+
# (Adzome may contain acc and date/time/label even if GPS doesn't exist)
|
|
1475
1496
|
@acc = ($1/100, $2/100, $3/100);
|
|
1497
|
+
if (not defined $yr and $buf2 =~ /^.{8}(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2}).(.{15})/s) {
|
|
1498
|
+
($yr,$mon,$day,$hr,$min,$sec,$lbl) = ($1,$2,$3,$4,$5,$6,$7);
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
if (defined $lbl) {
|
|
1502
|
+
$lbl =~ s/\0.*//s; $lbl =~ s/\s+$//; # truncate at null and remove trailing spaces
|
|
1503
|
+
push @xtra, UserLabel => $lbl if length $lbl;
|
|
1476
1504
|
}
|
|
1477
1505
|
|
|
1478
1506
|
} elsif ($$dataPt =~ /^.{52}(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/s) {
|
|
@@ -1741,8 +1769,6 @@ sub ProcessFreeGPS($$$)
|
|
|
1741
1769
|
# save tag values extracted by above code
|
|
1742
1770
|
#
|
|
1743
1771
|
FoundSomething($et, $tagTbl, $$dirInfo{SampleTime}, $$dirInfo{SampleDuration});
|
|
1744
|
-
# lat/long are in DDDMM.MMMM format
|
|
1745
|
-
ConvertLatLon($lat, $lon) unless $ddd;
|
|
1746
1772
|
$sec = '0' . $sec unless $sec =~ /^\d{2}/; # pad integer part of seconds to 2 digits
|
|
1747
1773
|
if (defined $yr) {
|
|
1748
1774
|
my $time = sprintf('%.4d:%.2d:%.2d %.2d:%.2d:%sZ',$yr,$mon,$day,$hr,$min,$sec);
|
|
@@ -1751,8 +1777,12 @@ sub ProcessFreeGPS($$$)
|
|
|
1751
1777
|
my $time = sprintf('%.2d:%.2d:%sZ',$hr,$min,$sec);
|
|
1752
1778
|
$et->HandleTag($tagTbl, GPSTimeStamp => $time);
|
|
1753
1779
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1780
|
+
if (defined $lat) {
|
|
1781
|
+
# lat/long are in DDDMM.MMMM format unless $ddd is set
|
|
1782
|
+
ConvertLatLon($lat, $lon) unless $ddd;
|
|
1783
|
+
$et->HandleTag($tagTbl, GPSLatitude => $lat * ($latRef eq 'S' ? -1 : 1));
|
|
1784
|
+
$et->HandleTag($tagTbl, GPSLongitude => $lon * ($lonRef eq 'W' ? -1 : 1));
|
|
1785
|
+
}
|
|
1756
1786
|
$et->HandleTag($tagTbl, GPSAltitude => $alt) if defined $alt;
|
|
1757
1787
|
$et->HandleTag($tagTbl, GPSSpeed => $spd) if defined $spd;
|
|
1758
1788
|
$et->HandleTag($tagTbl, GPSTrack => $trk) if defined $trk;
|
|
@@ -2835,7 +2865,7 @@ sub ProcessInsta360($;$)
|
|
|
2835
2865
|
$raf->Read($buff, $len) == $len or last;
|
|
2836
2866
|
$et->VerboseDump(\$buff) if $verbose > 2;
|
|
2837
2867
|
if ($dlen) {
|
|
2838
|
-
if ($len % $dlen) {
|
|
2868
|
+
if ($len % $dlen and $id != 0x700) { # (have seen one 0x700 record which was expected format but not multiple of 53 bytes)
|
|
2839
2869
|
$et->Warn(sprintf('Unexpected Insta360 record 0x%x length',$id));
|
|
2840
2870
|
} elsif ($id == 0x200) {
|
|
2841
2871
|
$et->FoundTag(PreviewImage => $buff);
|
|
@@ -2865,19 +2895,20 @@ sub ProcessInsta360($;$)
|
|
|
2865
2895
|
$et->HandleTag($tagTbl, VideoTimeStamp => sprintf('%.3f', Get64u(\$buff, $p) / 1000));
|
|
2866
2896
|
}
|
|
2867
2897
|
} elsif ($id == 0x700) {
|
|
2868
|
-
for ($p=0; $p
|
|
2898
|
+
for ($p=0; $p+$dlen<=$len; $p+=$dlen) {
|
|
2869
2899
|
my $tmp = substr($buff, $p, $dlen);
|
|
2870
2900
|
my @a = unpack('VVvaa8aa8aa8a8a8', $tmp);
|
|
2871
|
-
next unless $a[3] eq 'A'; # (ignore void fixes)
|
|
2872
2901
|
unless (($a[5] eq 'N' or $a[5] eq 'S') and # (quick validation)
|
|
2873
2902
|
($a[7] eq 'E' or $a[7] eq 'W' or
|
|
2874
2903
|
# (odd, but I've seen "O" instead of "W". Perhaps
|
|
2875
2904
|
# when the language is french? ie. "Ouest"?)
|
|
2876
2905
|
$a[7] eq 'O'))
|
|
2877
2906
|
{
|
|
2907
|
+
next if $a[3] eq 'V'; # void fixes don't have N/S E/W
|
|
2878
2908
|
$et->Warn('Unrecognized INSV GPS format');
|
|
2879
2909
|
last;
|
|
2880
2910
|
}
|
|
2911
|
+
next unless $a[3] eq 'A'; # (ignore void fixes)
|
|
2881
2912
|
$$et{DOC_NUM} = ++$$et{DOC_COUNT};
|
|
2882
2913
|
$a[$_] = GetDouble(\$a[$_], 0) foreach 4,6,8,9,10;
|
|
2883
2914
|
$a[4] = -abs($a[4]) if $a[5] eq 'S'; # (abs just in case it was already signed)
|
|
@@ -412,7 +412,7 @@ numerical, and generated automatically otherwise.
|
|
|
412
412
|
'IsComposite' - flag set for Composite tags
|
|
413
413
|
|
|
414
414
|
'IsImageData' - flag set if this is an image data offset to
|
|
415
|
-
be included in
|
|
415
|
+
be included in ImageDataHash calculation. Must have an
|
|
416
416
|
OffsetPair entry which is the ID of the corresponding size.
|
|
417
417
|
|
|
418
418
|
'IsOffset' - flag set if the tag represents an offset to some
|
|
@@ -637,7 +637,7 @@ numerical, and generated automatically otherwise.
|
|
|
637
637
|
RawConv instead to return undef if it is necessary to test the
|
|
638
638
|
value for validity, otherwise an undef tag may hide a
|
|
639
639
|
previously defined value when the Duplicates option is not
|
|
640
|
-
enabled.
|
|
640
|
+
enabled. If this isn't possible (as with Composite tags where
|
|
641
641
|
the converted values of the source tags are needed), set the
|
|
642
642
|
Priority to 0 to avoid taking priority over a valid tag. If
|
|
643
643
|
ValueConv is not specified, the Raw value is not converted.
|
|
@@ -30,7 +30,7 @@ use strict;
|
|
|
30
30
|
use vars qw($VERSION $AUTOLOAD);
|
|
31
31
|
use Image::ExifTool qw(:DataAccess :Utils);
|
|
32
32
|
|
|
33
|
-
$VERSION = '1.
|
|
33
|
+
$VERSION = '1.65';
|
|
34
34
|
|
|
35
35
|
sub ConvertTimecode($);
|
|
36
36
|
sub ProcessSGLT($$$);
|
|
@@ -38,7 +38,7 @@ sub ProcessSLLT($$$);
|
|
|
38
38
|
sub ProcessLucas($$$);
|
|
39
39
|
sub WriteRIFF($$);
|
|
40
40
|
|
|
41
|
-
# RIFF chunks containing image data (to include in
|
|
41
|
+
# RIFF chunks containing image data (to include in ImageDataHash digest)
|
|
42
42
|
my %isImageData = (
|
|
43
43
|
LIST_movi => 1, # (AVI: contains ##db, ##dc, ##wb)
|
|
44
44
|
data => 1, # (WAV)
|
|
@@ -652,6 +652,7 @@ my %code2charset = (
|
|
|
652
652
|
Name => 'Acidizer',
|
|
653
653
|
SubDirectory => { TagTable => 'Image::ExifTool::RIFF::Acidizer' },
|
|
654
654
|
},
|
|
655
|
+
guan => 'Guano', #forum14831
|
|
655
656
|
);
|
|
656
657
|
|
|
657
658
|
# the maker notes used by some digital cameras
|
|
@@ -1987,7 +1988,7 @@ sub ProcessRIFF($$)
|
|
|
1987
1988
|
my $unknown = $et->Options('Unknown');
|
|
1988
1989
|
my $validate = $et->Options('Validate');
|
|
1989
1990
|
my $ee = $et->Options('ExtractEmbedded');
|
|
1990
|
-
my $
|
|
1991
|
+
my $hash = $$et{ImageDataHash};
|
|
1991
1992
|
|
|
1992
1993
|
# verify this is a valid RIFF file
|
|
1993
1994
|
return 0 unless $raf->Read($buff, 12) == 12;
|
|
@@ -2045,6 +2046,7 @@ sub ProcessRIFF($$)
|
|
|
2045
2046
|
} else {
|
|
2046
2047
|
next;
|
|
2047
2048
|
}
|
|
2049
|
+
last;
|
|
2048
2050
|
}
|
|
2049
2051
|
# stop when we hit the audio data or AVI index or AVI movie data
|
|
2050
2052
|
# --> no more because Adobe Bridge stores XMP after this!!
|
|
@@ -2067,9 +2069,9 @@ sub ProcessRIFF($$)
|
|
|
2067
2069
|
# (in LIST_movi chunk: ##db = uncompressed DIB, ##dc = compressed DIB, ##wb = audio data)
|
|
2068
2070
|
if ($tagInfo or (($verbose or $unknown) and $tag !~ /^(data|idx1|LIST_movi|RIFF|\d{2}(db|dc|wb))$/)) {
|
|
2069
2071
|
$raf->Read($buff, $len2) == $len2 or $err=1, last;
|
|
2070
|
-
if ($
|
|
2071
|
-
$
|
|
2072
|
-
$et->VPrint(0, "$$et{INDENT}(
|
|
2072
|
+
if ($hash and $isImageData{$tag}) {
|
|
2073
|
+
$hash->add($buff);
|
|
2074
|
+
$et->VPrint(0, "$$et{INDENT}(ImageDataHash: '${tag}' chunk, $len2 bytes)\n");
|
|
2073
2075
|
}
|
|
2074
2076
|
my $setGroups;
|
|
2075
2077
|
if ($tagInfo and ref $tagInfo eq 'HASH' and $$tagInfo{SetGroups}) {
|
|
@@ -2099,10 +2101,10 @@ sub ProcessRIFF($$)
|
|
|
2099
2101
|
next; # (must not increment $pos)
|
|
2100
2102
|
} else {
|
|
2101
2103
|
my $rewind;
|
|
2102
|
-
# do
|
|
2103
|
-
if ($
|
|
2104
|
+
# do hash if required
|
|
2105
|
+
if ($hash and $isImageData{$tag}) {
|
|
2104
2106
|
$rewind = $raf->Tell();
|
|
2105
|
-
$et->
|
|
2107
|
+
$et->ImageDataHash($raf, $len2, "'${tag}' chunk");
|
|
2106
2108
|
}
|
|
2107
2109
|
if ($tag eq 'LIST_movi' and $ee) {
|
|
2108
2110
|
$raf->Seek($rewind, 0) or $err = 1, last if $rewind;
|