Branch Coverage

blib/lib/Image/ExifTool/WriteQuickTime.pl
Criterion Covered Total %
branch 552 1004 54.9


line true false branch
153 4 0 if (@v == 2 or @v == 3)
157 0 0 $below ? :
0 4 if @v == 3
160 0 0 if $val =~ /^([-+]?\d+(\.\d*)?)\s+([-+]?\d+(\.\d*)?)$/
161 0 0 if $val =~ m[^([-+]\d+(\.\d*)?){2,3}(CRS.*)?/?$]
174 36 4 if (@a == 2 or @a == 3)
185 0 92 unless &Image::ExifTool::IsFloat($_)
187 0 0 @limit ? :
0 92 if $lim and abs $_ > $lim
188 4 88 length $3 < 3 ? :
192 0 4 if $val =~ m[^([-+]\d+(\.\d*)?){2,3}(CRS.*)?/?$]
209 0 3 if $len < 8
217 0 3 unless $ok{$noff} and $ok{$nlen} and $ok{$nbas} and $ok{$nind}
219 3 0 $noff == 4 ? :
220 3 0 if ($ver < 2) { }
224 0 0 if $len < 10
229 9 0 if ($ver < 2) { }
230 0 9 if $pos + 2 > $len
234 0 0 if $pos + 4 > $len
239 0 9 if ($ver == 1 or $ver == 2)
240 0 0 if $pos + 2 > $len
246 0 9 if $pos + 2 > $len
248 0 9 if ($drefIdx)
249 0 0 if ($et->{'QtDataRef'} and $et->{'QtDataRef'}[$drefIdx - 1]) { }
252 0 0 unless $dref->[1] == 1 and $dref->[0] ne "rsrc"
261 6 3 if ($base_offset and not $constOff)
262 6 0 $nbas == 4 ? :
265 0 9 if $pos + 2 > $len
271 0 9 if $ver == 1 or $ver == 2
273 0 9 unless defined $extent_offset
274 9 0 unless ($constOff)
275 9 0 if $noff
276 9 0 if not defined $minOffset or $minOffset > $extent_offset
278 0 9 if $pos + $nlen > length $$dataPt
283 3 6 if (defined $minOffset and $minOffset > $base_offset) { }
301 0 119 unless $langCode
304 119 0 unless defined $writable
305 0 119 unless $writable
319 170 535 unless $format
333 32 0 unless $format
334 2 30 if ($format and $format ne 'string' or not $format and $writable and $writable ne 'string') { }
0 30 elsif ($$valPt =~ /^\xff\xd8\xff/) { }
0 30 elsif ($$valPt =~ /^(\x89P|\x8aM|\x8bJ)NG\r\n\x1a\n/) { }
0 30 elsif ($$valPt =~ /^BM.{15}\0/s) { }
336 0 2 if ($writable and $qtFormat{$writable}) { }
351 0 32 unless defined $$valPt
362 6 0 if ($n == 4) { }
0 0 elsif ($n == 8) { }
377 0 0 unless $et
378 0 0 if $et->{'DEL_GROUP'}{'Nextbase'}
392 208 20 unless $et
398 6 14 $Image::ExifTool::QuickTime::avType{$et->{'MediaType'}} ? :
399 0 20 if $dirLen < 8
400 6 14 if ($et->{'DEL_GROUP'}{$keysGrp})
405 2 4 $n == 1 ? :
416 0 25 if $len < 8 or $pos + $len > $dirLen
420 25 0 if $ns eq "mdta"
421 0 25 unless $tag
424 25 0 if ($tagInfo)
426 2 23 if ($newTags->{$tag})
429 1 1 if ($nvHash and $et->IsOverwriting($nvHash) > 0 and not defined $et->GetNewValue($nvHash))
433 6 0 unless $newTags->{$t}{'SrcTagInfo'} and $newTags->{$t}{'SrcTagInfo'} eq $tagInfo
435 0 0 unless $et->IsOverwriting($nv) and defined $et->GetNewValue($nv)
439 1 0 unless ($dontDelete)
459 3 16 if ($tagInfo->{'LangCode'} and $tagInfo->{'SrcTagInfo'}) { }
464 4 15 if $done{$id}
466 0 11 unless $nvHash->{'IsCreating'} and $et->IsOverwriting($nvHash) and defined $et->GetNewValue($nvHash)
470 11 0 unless ($val =~ /^(.*?)\./ and $fullKeysID{$1})
479 16 4 if ($num) { }
506 0 3 unless $items and $raf
515 0 9 unless defined $primary
518 6 3 unless $item->{'RefersTo'} and $item->{'RefersTo'}{$primary}
520 0 3 if $type eq "tmap"
523 0 3 unless $name
524 0 3 unless $et->{'EDIT_DIRS'}{$name}
527 0 3 unless $boxPos->{'iloc'}
528 0 3 unless $item->{'Extents'} and @{$item->{'Extents'};}
529 0 3 if ($item->{'ContentEncoding'})
530 0 0 if ($item->{'ContentEncoding'} ne 'deflate') { }
0 0 elsif (not eval { do { require Compress::Zlib } }) { }
536 0 3 if $item->{'ProtectionIndex'}
537 0 3 if $item->{'ConstructionMethod'}
538 0 3 if $item->{'DataReferenceIndex'}
539 0 3 if $warn
543 0 3 if defined $buff
545 2 1 if ($extent->[2]) { }
546 0 2 unless $raf->Seek($pos, 0)
547 0 2 unless $raf->Read($buff, $extent->[2])
553 0 3 unless defined $buff
554 0 3 if length $val
556 0 3 if (defined $comp and $comp ^^ $item->{'ContentEncoding'})
561 0 3 if ($item->{'ContentEncoding'})
564 0 0 if $inflate
566 0 0 if ($inflate and $stat == Compress::Zlib::Z_STREAM_END()) { }
576 1 2 if ($name eq 'EXIF') { }
577 0 1 if (not length $buff) { }
0 1 elsif ($buff =~ /^(MM\0\x2a|II\x2a\0)/) { }
1 0 elsif (length $buff >= 4 and length $buff >= 4 + unpack('N', $buff)) { }
604 3 0 if (defined $newVal and $changed ne $et->{'CHANGED'} and $dirInfo{'DirLen'} || length $newVal)
608 1 2 if length $hdr and length $newVal
609 0 3 if ($wasDeflated)
611 0 0 if ($deflate)
614 0 0 if (defined $buff)
627 0 3 if ($nlen == 8) { }
3 0 elsif ($n <= 4294967295) { }
637 0 3 if (@{$item->{'Extents'};} != 1)
648 4 2 if $did{$name} or not $et->{'ADD_DIRS'}{$name}
651 0 2 if (@missing)
652 0 0 @missing > 1 ? :
656 0 2 unless (defined $et->{'PrimaryItem'})
657 0 0 unless (defined $primary)
662 0 0 if ($primary < 65536) { }
671 1 1 if ($name eq 'EXIF') { }
687 2 0 if (defined $newVal and $changed ne $et->{'CHANGED'})
689 2 0 if ($boxPos->{'iref'}) { }
693 0 0 $primary < 65536 ? :
696 1 1 if length $hdr
698 2 0 unless defined $add{'iinf'}
701 1 1 if ($name eq 'XMP') { }
705 0 1 if ($et->Options("Compress") and length $newVal)
706 0 0 if (not eval { do { require Compress::Zlib } }) { }
710 0 0 if ($deflate)
713 0 0 if (defined $buff)
729 2 0 if ($id < 65536) { }
737 0 2 if ($irefVer) { }
738 0 0 defined $tmap ? :
741 0 2 defined $tmap ? :
752 2 0 if ($ilocVer == 0) { }
0 0 elsif ($ilocVer == 1) { }
0 0 elsif ($ilocVer == 2) { }
773 0 2 unless my $off = $dirInfo->{'ChunkOffset'}
775 2 0 if ($noff == 4) { }
0 0 elsif ($noff == 8) { }
0 0 elsif ($noff == 0) { }
781 0 0 if ($nbas == 4) { }
0 0 elsif ($nbas == 8) { }
801 2 1 if ($countNew)
808 6 6 unless $add{$tag}
810 6 0 $boxPos->{$tag}[1] ? :
811 0 0 unless $tag eq "iref"
819 2 4 if ($tag eq 'iinf') { }
2 2 elsif ($tag eq 'iref') { }
2 0 elsif ($tag eq 'iloc') { }
0 0 elsif ($tag ne 'hdlr') { }
821 0 2 if ($iinfVer == 0) { }
823 0 0 if ($n > 65535)
836 2 0 if ($ilocVer < 2) { }
839 0 2 if ($n > 65535)
848 0 2 if ($added)
885 3 0 @mdatEdit ? :
899 625 412 unless $et
913 389 23 $dataPt ? :
916 23 389 if ($raf)
918 0 23 if $trailer and not ref $trailer
920 389 23 if ($dataPt) { }
923 0 23 unless $raf
929 70 342 if $dirStart
931 172 240 if ($Image::ExifTool::QuickTime::avType{$et->{'MediaType'}}) { }
942 12 400 if ($addDirs->{'Keys'} and $curPath =~ /^MOV-Movie(-Meta)?$/) { }
8 392 elsif ($addDirs->{'AudioKeys'} || $addDirs->{'VideoKeys'} and $curPath =~ /^MOV-Movie-Track(-Meta)?$/) { }
20 372 elsif ($curPath eq 'MOV-Movie-Meta-ItemList' or $curPath eq 'MOV-Movie-Track-Meta-ItemList' and $Image::ExifTool::QuickTime::avType{$et->{'MediaType'}}) { }
951 20 0 if ($keys)
956 24 1 if $keys->{'Remap'}{$index}
963 16 3 unless $index
965 2 1 if ($tagInfo->{'LangCode'})
967 2 0 unless $langTags{$id}
979 36 6 unless $newTags->{$_}{'LangCode'} and $newTags->{$_}{'SrcTagInfo'}
981 6 0 unless $langTags{$id}
985 166 246 if ($curPath eq $writePath or $createKeys)
988 40 126 $createKeys ? :
990 3 409 if $tagTablePtr->{'VARS'}
993 3 409 if $dirName eq "ItemPropertyContainer"
997 3 409 if ($dirName eq "ItemProperties")
1000 0 6 unless $raf->Read($buf2, 8) == 8
1003 0 6 if $size < 0
1004 3 3 unless $tag eq "ipma"
1005 3 0 if $raf->Read($buf2, $size) == $size
1011 15 1787 if defined $itemIndex
1014 0 1802 if ($trailer and $lastPos >= $trailer->[1])
1015 0 0 if $lastPos != $trailer->[1]
1018 1327 475 if $tagTablePtr->{$tag}
1019 0 0 if (defined $atomCount and --$atomCount < 0 and $dataPt)
1021 0 0 unless &Write($outfile, substr($$dataPt, $raf->Tell))
1026 412 1390 unless ($n == 8)
1027 0 412 if ($n == 4 and $hdr eq "\000\000\000\000") { }
0 412 elsif ($n != 0) { }
1033 0 0 if $n > 3 or $hdr ne "\0" x $n
1039 3 1387 if ($size == -7) { }
0 1387 elsif ($size == -8) { }
0 1387 elsif ($size < 0) { }
1041 0 3 unless $raf->Read($buff, 8) == 8
1044 0 3 if ($hi or $lo > 2147483647)
1045 0 0 if ($hi > 2147483647) { }
0 0 elsif (not $et->Options('LargeFileSupport')) { }
0 0 elsif ($et->Options('LargeFileSupport') eq '2') { }
1056 0 3 if $size < 0
1058 0 0 if ($dataPt) { }
1059 0 0 if $dirInfo->{'DirName'} eq "CanonCNTH"
1077 26 1364 if ($tag eq 'mdat') { }
0 1364 elsif ($tag eq 'cmov') { }
0 1364 elsif ($tag eq 'wide') { }
1078 0 26 if ($dataPt)
1083 0 26 unless $raf->Seek($size, 1)
1089 0 0 if ($size)
1091 0 0 unless $raf->Seek($size, 1)
1098 7 1357 if (not $size) { }
1103 0 1357 $size > $maxReadLen ? :
1105 0 1364 if ($got != $size)
1108 0 0 if ($got <= 256 and $size >= 1024 and $tag ne 'mdat' or $got < 3000 and pack('N', $size) =~ /^]/ and $type = 'extraneous HTML') { }
1112 0 0 unless $type
1113 0 0 if ($et->{'OPTIONS'}{'IgnoreMinorErrors'}) { }
1122 0 0 if ($size > $maxReadLen and $got == 65536) { }
1132 43 68 if ($tag eq "hdlr" and length $buff >= 12 and @{$et->{'PATH'};} and $et->{'PATH'}[-1] eq "Media")
1139 59 1305 if ($tag =~ /^(stco|co64|iloc|mfra|moof|sidx|saio|gps |CTBO|uuid)$/)
1142 0 59 if ($tag eq 'mfra' or $tag eq 'moof') { }
0 59 elsif ($tag eq 'sidx' or $tag eq 'saio') { }
3 56 elsif ($tag eq 'iloc') { }
0 56 elsif ($tag eq 'gps ') { }
13 43 elsif ($tag eq 'CTBO' or $tag eq 'uuid') { }
43 0 elsif (not $flg or $flg == 1) { }
0 0 elsif ($flg == 3) { }
1149 0 3 unless &Handle_iloc($et, $dirInfo, \$buff, $outfile)
1152 0 0 if ($dirInfo->{'DirID'} and $dirInfo->{'DirID'} eq "moov" and length $buff > 8)
1155 0 0 if $num * 8 + 8 > length $buff
1165 0 43 unless $flg
1178 18 1236 if $tagInfo and $tagInfo->{'WriteHook'}
1181 36 0 if (not $tagInfo and $dirName eq "ItemList" and $et->{$keysGrp})
1184 36 0 if (defined $newIndex) { }
1186 12 24 unless ($newIndex)
1187 1 11 if ($tagInfo) { }
1196 2 22 unless ($keysIndex == $newIndex)
1205 123 1229 if ($delGrp)
1206 70 53 if ($dirName eq 'ItemList') { }
21 54 elsif ($dirName eq 'UserData' and not $tagInfo && $tagInfo->{'SubDirectory'}) { }
1216 0 1187 if $tagInfo and $tagInfo->{'AddedUnknown'}
1220 12 0 if (defined $itemIndex and $et->{'ItemInfo'})
1224 0 12 unless (defined $primary)
1225 0 0 if $et->{'ItemInfo'}
1226 0 0 unless defined $primary
1229 3 9 unless $pitem->{'RefersTo'}
1231 12 24 unless $items->{$id}{'Association'}
1234 30 12 unless $prop == $itemIndex
1240 6 0 unless $id == $primary or not $dont and ($item->{'RefersTo'} and $item->{'RefersTo'}{$primary}) or $dont != 1 and $pitem->{'RefersTo'}{$id}
1245 6 6 unless $isPrimary
1248 1181 0 if ($tagInfo and !defined($tagInfo->{'Writable'}) || $tagInfo->{'Writable'})
1252 761 420 if ($subdir) { }
1254 43 718 if ($tag eq "trak")
1264 0 0 if $tagInfo->{'DontRead'} and $trailer and $base == $trailer->[1]
1265 0 761 if ($subdir->{'Base'})
1270 0 0 if $localBase <= $hdrLen
1297 0 761 if $et->Options("QuickTimePad")
1300 76 685 if ($hdrLen and $hdrLen < $size)
1304 11 750 if $subdir->{'ByteOrder'} and $subdir->{'ByteOrder'} =~ /^Little/
1306 43 718 if ($subName eq "Track")
1307 20 23 unless $track
1312 45 716 unless $subTable->{'GROUPS'}{'0'} eq "QuickTime"
1315 41 720 if ($et->{'DemoteErrors'})
1317 0 41 if $et->{'DemoteErrors'} > 1
1320 0 23 if (defined $newData and not length $newData and $tagInfo->{'Permanent'} || $tagTablePtr->{'PERMANENT'} && !defined($tagInfo->{'Permanent'}))
1327 43 718 if ($tag eq "trak")
1329 0 43 if ($et->{'AssumedDataRef'})
1338 69 2 if ($start and defined $newData and length $newData || defined $tagInfo->{'Permanent'} && !$tagInfo->{'Permanent'})
1345 42 260 if ($curPath eq $writePath and $addDirs->{$subName} and $addDirs->{$subName} eq $dirName)
1353 5 408 if ($nvHash or $langTags{$tag} or $delGrp)
1359 8 4 if ($hasData) { }
0 4 elsif ($format) { }
4 0 elsif ($tag =~ /^\xa9/ || $tagInfo->{'IText'} and $size >= ($tagInfo->{'IText'} || 4)) { }
1362 8 8 if ($pos + 16 > $size)
1364 4 4 if ($langTags{$tag})
1367 4 4 $tg ? :
1369 5 3 unless $nvHash and not $didTag->{$nvHash}
1371 2 1 unless $nvHash->{'IsCreating'} and $et->IsOverwriting($nvHash)
1373 0 1 unless defined $newVal
1376 0 1 unless defined $newVal
1378 1 0 if ($ti->{'LangCode'})
1379 0 1 unless ($ti->{'LangCode'} =~ /^([A-Z]{3})?[-_]?([A-Z]{2})?$/i)
1384 1 0 if ($1 and $1 ne "und")
1387 1 0 if $2 and $2 ne "ZZ"
1389 1 0 unless defined $newData
1399 6 2 unless $lang
1407 0 0 if $nvHash or not $ctry or $lang ne $undLang or length $langCode == 2
1413 4 4 if (not $nvHash and $nvHashNoLang)
1414 4 0 if ($lang eq $undLang and not $ctry and not $didTag->{$nvHashNoLang}) { }
1420 0 8 if $pos + $len > $size
1421 8 0 if ($type eq 'data' and $len >= 16) { }
0 0 elsif (defined $newData) { }
1426 8 0 if ($Image::ExifTool::QuickTime::stringEncoding{$flags}) { }
1428 8 0 unless $tagInfo->{'Binary'}
1431 0 0 if ($format) { }
1433 0 0 if ($tagInfo->{'Writable'} and $qtFormat{$tagInfo->{'Writable'}}) { }
0 0 elsif ($qtFormat{$format}) { }
1441 0 0 if $format
1443 5 3 if ($nvHash and $et->IsOverwriting($nvHash, $val) or $delTag) { }
0 3 elsif (defined $newData) { }
1444 5 0 if defined $nvHash
1445 2 3 if ($delTag or not defined $newVal or $didTag->{$nvHash})
1450 2 0 unless defined $newData
1457 0 3 unless defined $newVal
1461 3 0 unless defined $newData
1462 3 0 $lang eq $undLang ? :
1472 4 2 if $nvHash
1474 0 8 if defined $newData and $pos < $size
1480 0 4 if ($tagInfo->{'IText'} and $tagInfo->{'IText'} >= 6) { }
1489 0 4 if 4 + $len > $size
1490 0 4 if $len > $size - 4 or $len < 0
1493 4 0 unless $lang
1495 0 4 if ($lang < 1024 and not $val =~ /^\xfe\xff/) { }
1499 0 4 $val =~ s/^\xfe\xff// ? :
1501 4 0 unless ($tagInfo->{'NoDecode'})
1505 0 4 if defined $hdr
1509 3 1 if (not $nvHash and $nvHashNoLang)
1510 3 0 if ($lang eq $undLang and not $didTag->{$nvHashNoLang}) { }
0 0 elsif ($canCreate) { }
1522 0 0 if ($tag =~ /^\xa9/ or $tagInfo->{'IText'})
1526 3 9 if ($nvHash and defined $val)
1527 3 0 if ($et->IsOverwriting($nvHash, $val))
1529 0 3 unless defined $newData or $canCreate
1533 0 3 unless (defined $newData and not $didTag->{$nvHash})
1535 0 0 unless defined $itemIndex
1539 3 0 if (defined $lang) { }
0 0 elsif (not $format or $format =~ /^string/ and not $tagInfo->{'Binary'} and not $tagInfo->{'ValueConv'}) { }
0 0 elsif ($format and not $tagInfo->{'Binary'}) { }
1542 0 3 if ($iText > 6)
1543 0 0 if length $newData < $iText - 6
1547 3 0 unless ($tagInfo->{'NoDecode'})
1548 0 3 $lang < 1024 ? :
1550 3 0 $lang eq $undLang ? :
1551 3 0 if ($iText < 6) { }
0 0 elsif ($iText == 6) { }
1573 528 653 if (defined $newData)
1576 0 528 if ($sizeDiff > 0 and $tagInfo->{'PreservePadding'} and $et->Options('QuickTimePad')) { }
115 413 elsif ($sizeDiff) { }
1583 0 528 if $len > 2147483647
1585 5 523 if $tag eq "uuid"
1586 25 503 unless $len > 8
1588 198 305 if (@chunkOffset)
1592 1 502 if ($tagInfo->{'WriteLast'}) { }
1597 0 502 unless &Write($outfile, &Set32u($len), $tag, $newData)
1603 0 733 if ($tag eq 'dinf') { }
43 690 elsif ($parent eq 'DataInfo' and length $buff >= 4) { }
43 1294 elsif ($tag eq 'stsd' and length $buff >= 8) { }
1613 0 43 unless $pos + 16 <= length $buff
1615 0 43 unless $pos + $siz <= length $buff
1618 0 43 if (not $drefIdx) { }
43 0 elsif ($drefTbl and $$drefTbl[$drefIdx - 1]) { }
1623 43 0 $dref->[1] == 1 && $dref->[0] ne 'rsrc' ? :
1630 0 43 if ($msg)
1634 0 0 if ($Image::ExifTool::QuickTime::avType{$et->{'MediaType'}})
1642 0 43 if ($et->{'AssumedDataRef'})
1643 0 0 if ($flg != $et->{'AssumedDataRef'})
1650 0 733 if ($tagInfo and $tagInfo->{'WriteLast'}) { }
1662 0 733 unless &Write($outfile, $hdr, $buff)
1666 0 412 if ($errStr)
1667 0 0 if ($lastTag eq 'mdat' || $lastTag eq 'moov' and not $dataPt and !$tagTablePtr->{$tag} || ref $tagTablePtr->{$tag} eq 'HASH' && $tagTablePtr->{$tag}{'Unknown'}) { }
1672 0 0 if $raf->Seek($lastPos, 0)
1674 0 0 if ($buf2 eq 'CCCCCCCC') { }
0 0 elsif ($buf2 =~ /^(gpsa|gps0|gsen|gsea)...\0/s) { }
1682 0 0 if ($trailer) { }
1685 0 0 $dataPt ? :
0 0 unless $raf->Seek(0, 2)
1692 0 0 $dataPt ? :
1695 2 11 $delCount == 1 ? :
13 399 if $delCount
1698 8 404 if ($createKeys < 0)
1699 8 0 if ($Image::ExifTool::QuickTime::avType{$et->{'MediaType'}}) { }
1706 340 72 unless $addDirs->{$keysGrp}
1709 129 37 if ($canCreate and exists $et->{'EDIT_DIRS'}{$dirName} || $createKeys)
1716 37 92 if ($createKeys)
1717 7 30 if ($curPath eq $keysPath) { }
10 20 elsif ($curPath eq "$keysPath-Meta") { }
20 0 elsif ($curPath eq "$keysPath-Meta-ItemList" and $et->{$keysGrp}) { }
1719 7 0 unless ($didDir{'meta'})
1728 20 0 if $didDir{$_}
1746 0 78 unless (ref $tagInfo eq "HASH")
1751 0 0 unless ref $tagInfo eq "ARRAY"
1752 0 0 unless $tagInfo = $et->GetTagInfo($tagTablePtr, $tag)
1754 0 78 if defined $tagInfo->{'CanCreate'} and not $tagInfo->{'CanCreate'}
1755 0 78 if defined $tagInfo->{'MediaType'} and $et->{'MediaType'} ne $tagInfo->{'MediaType'}
1757 56 22 unless ($subdir)
1759 10 46 unless $nvHash and not $didTag->{$nvHash}
1760 18 28 unless $nvHash->{'IsCreating'} and $et->IsOverwriting($nvHash)
1762 0 28 unless defined $newVal
1765 0 28 unless defined $newVal
1768 2 26 if ($tagInfo->{'LangCode'})
1770 0 2 unless ($tagInfo->{'LangCode'} =~ /^([A-Z]{3})?[-_]?([A-Z]{2})?$/i)
1775 2 0 if ($1 and $1 ne "und")
1778 2 0 if $2 and $2 ne "ZZ"
1780 20 8 if ($dirInfo->{'HasData'}) { }
8 0 elsif ($tag =~ /^\xa9/ or $tagInfo->{'IText'}) { }
0 0 elsif ($ctry or $lang) { }
1784 0 8 if ($ctry) { }
2 6 elsif ($tagInfo->{'IText'} and $tagInfo->{'IText'} >= 6) { }
1792 0 2 if length $newVal < $n
1803 0 28 if ($tagInfo->{'WriteLast'}) { }
1807 0 28 unless &Write($outfile, &Set32u(8 + length($newVal)), $tag, $newVal)
1817 7 15 if ($createKeys and $curPath eq $keysPath and $subName eq 'Meta') { }
0 15 elsif ($createKeys and $curPath eq "$keysPath-Meta") { }
3 12 elsif ($subName eq 'Meta' and $et->{'OPTIONS'}{'QuickTimeHandler'}) { }
1824 0 0 $subName eq 'Keys' ? :
1830 0 12 unless $curPath eq $writePath and $addDirs->{$subName} and $addDirs->{$subName} eq $dirName
1845 22 0 if ($newData and length $newData <= 2147483639)
1848 6 16 if ($subdir->{'Start'})
1849 3 3 if ($subdir->{'Start'} == 4) { }
1854 3 0 if $cond and $cond =~ m[=~\s*\/\^(.*)/]
1855 0 3 unless length $prefix == $subdir->{'Start'}
1859 1 21 if ($tagInfo->{'WriteLast'}) { }
1862 2 19 if ($tag eq "uuid")
1868 0 21 unless &Write($outfile, $newHdr, $newData)
1873 13 9 unless $createKeys
1877 3 0 if ($curPath eq "MOV-Meta" and $et->{'EDIT_DIRS'}{'ItemInformation'})
1880 3 0 if ($mdatEdit)
1881 0 3 if $et->{'mdatEdit'}
1886 0 412 if $term and length $$outfile
1889 40 372 if ($dirName eq "Meta")
1893 6 34 if ($isEmpty)
1894 6 0 if %boxPos
1899 20 20 if ($curPath eq "$keysPath-Meta")
1906 389 23 if ($dataPt)
1907 0 389 if $writeLast
1908 0 389 $err ? :
1913 0 23 unless (@mdat)
1915 0 0 if $co->[0] eq "uuid"
1925 3 20 if ($et->{'mdatEdit'})
1933 10 2 if (length $mdat->[2])
1943 7 5 if defined $mdat->[5] or $changed
1944 5 0 if (not $edit->[0] or ($edit->[0] < $mdat->[1] || !$mdat->[1] and $edit->[1] > $mdat->[0] or $edit->[0] == $edit->[1] and $edit->[0] == $mdat->[0] || $edit->[0] == $mdat->[1]))
1950 2 3 if (not $edit->[0]) { }
0 3 elsif ($edit->[0] < $mdat->[0] or $edit->[1] > $mdat->[1] and $mdat->[1]) { }
1957 0 5 unless $hdrChunk
1959 5 0 $edit->[2] ? :
1961 5 0 if ($diff)
1962 5 0 if (length $hdrChunk->[2] == 8) { }
0 0 elsif (length $hdrChunk->[2] == 16) { }
1964 5 0 if ($size)
1966 0 5 if $size > 4294967295
1971 0 0 if ($size)
1982 0 5 if ($edit->[0] > $mdat->[0]) { }
1983 0 0 if $edit->[2]
1988 5 0 if ($edit->[2])
1993 5 0 if ($edit->[3])
1996 14 5 unless defined $co->[4] and $co->[4] == $edit->[3]
1998 5 0 if ($co->[0] eq 'stco_iloc') { }
2004 0 5 unless $n == 1
2011 5 0 if ($changed) { }
2025 5 26 $mdat->[4] ? :
2031 69 0 unless $base
2032 15 54 unless ($type =~ /^(stco|co64)_?(.*)$/)
2033 12 3 if $type eq "uuid"
2034 0 3 unless $type eq "CTBO"
2036 0 3 unless $co->[2] > 12
2037 0 3 unless @mdat
2039 0 3 if $co->[2] < $n * 20 + 12
2043 15 10 unless $_->[0] eq "uuid" and $_->[2] >= 24
2045 1 9 if $pos + 24 > length $$outfile
2047 0 9 if ($siz == 1)
2048 0 0 unless $_->[2] >= 32
2053 6 3 if defined $id
2062 3 0 unless &Get64u($outfile, $pos + 12) or $id == 1 or $id == 2
2063 0 9 unless (defined $ctboOff{$id})
2064 0 0 unless $id == 1 or $id == 2
2070 6 3 unless $ctboOff{$id}[2] < 0
2074 12 42 $1 eq 'co64' ? :
2076 11 43 if ($2) { }
2081 0 43 if $len < 8
2088 0 54 if $end > $ptr + $len
2091 12 11 $type eq 'co64' ? :
2095 17 21 if (defined $mdat->[5]) { }
2097 12 5 unless (defined $id and $id == $mdat->[5])
2099 12 0 unless $pos == $mdat->[0] and $mdat->[0] != $mdat->[1]
2103 3 18 unless $pos >= $mdat->[0] and $pos <= $mdat->[1] || !$mdat->[1]
2105 0 0 if $pos == $mdat->[1] and $i + 1 < @mdat and $pos == $mdat[$i + 1][0]
2108 0 23 if ($val < 0)
2112 12 11 if ($type eq 'co64') { }
11 0 elsif ($val <= 4294967295) { }
2123 0 23 unless ($ok)
2134 0 23 unless &Write($outfile, $outBuff)
2138 0 31 unless &Write($outfile, $mdat->[2])
2139 5 26 if ($mdat->[4]) { }
2140 0 5 unless &Write($outfile, ${$$mdat[4];})
2142 0 26 unless $raf->Seek($mdat->[0], 0)
2143 26 0 if ($mdat->[1]) { }
2145 0 26 unless defined $result
2146 0 26 unless $result
2150 0 0 unless &Write($outfile, $buf2)
2157 2 21 if $writeLast
2163 0 0 if ($et->{'DEL_GROUP'}{'Trailer'} or $et->{'DEL_GROUP'}{$trailer->[0]} or $nvTrail and not $nvTrail->{'Value'} && $nvTrail->{'Value'}[0])
2171 0 0 unless $raf->Seek($trailer->[1], 0)
2172 0 0 if ($trailer->[0] eq 'MIE') { }
2176 0 0 unless $result > 0
2181 0 0 $len > 65536 ? :
2182 0 0 unless $raf->Read($buf2, $n) == $n and &Write($outfile, $buf2)
2185 0 0 unless $rtnVal
2200 0 23 unless $et
2201 0 23 unless my $raf = $dirInfo->{'RAF'}
2205 0 23 unless $raf->Read($buff, 8) == 8
2207 0 23 if $size < 8 and $size != 1
2211 0 23 unless $tagTablePtr->{$tag}
2215 9 14 if ($tag eq 'ftyp' and $size >= 12 and $size < 100000 and $raf->Read($buff, $size - 8) == $size - 8 and not $buff =~ /^(....)+(qt )/s) { }
2219 3 6 if ($buff =~ /^crx /) { }
3 3 elsif ($buff =~ /^(heic|mif1|msf1|heix|hevc|hevx|avif)/) { }
2230 3 20 if ($ftype eq 'HEIC') { }
2247 23 0 &WriteQuickTime($et, $dirInfo, $tagTablePtr) ? :