Condition Coverage

blib/lib/Image/ExifTool/WriteQuickTime.pl
Criterion Covered Total %
condition 322 670 48.0


and 2 conditions

line l !l condition
1108 0 0 $got < 3000 and pack("N", $size) =~ /^]/ and $type = "extraneous HTML"

and 3 conditions

line !l l&&!r l&&r condition
154 4 0 0 $v[2] && $v[2] =~ /below/i
187 20 72 0 $lim and abs $_ > $lim
217 0 0 3 $ok{$noff} and $ok{$nlen}
0 0 3 $ok{$noff} and $ok{$nlen} and $ok{$nbas}
0 0 3 $ok{$noff} and $ok{$nlen} and $ok{$nbas} and $ok{$nind}
249 0 0 0 $et->{'QtDataRef'} and $et->{'QtDataRef'}[$drefIdx - 1]
252 0 0 0 $dref->[1] == 1 and $dref->[0] ne "rsrc"
261 3 0 6 $base_offset and not $constOff
283 0 6 3 defined $minOffset and $minOffset > $base_offset
334 32 0 0 $format and $format ne "string"
0 30 2 not $format and $writable
30 0 2 not $format and $writable and $writable ne "string"
336 0 2 0 $writable and $qtFormat{$writable}
429 0 0 2 $nvHash and $et->IsOverwriting($nvHash) > 0
0 1 1 $nvHash and $et->IsOverwriting($nvHash) > 0 and not defined $et->GetNewValue($nvHash)
433 5 1 0 $newTags->{$t}{'SrcTagInfo'} and $newTags->{$t}{'SrcTagInfo'} eq $tagInfo
435 0 0 0 $et->IsOverwriting($nv) and defined $et->GetNewValue($nv)
459 16 0 3 $tagInfo->{'LangCode'} and $tagInfo->{'SrcTagInfo'}
466 4 0 11 $nvHash->{'IsCreating'} and $et->IsOverwriting($nvHash)
4 0 11 $nvHash->{'IsCreating'} and $et->IsOverwriting($nvHash) and defined $et->GetNewValue($nvHash)
470 6 5 0 $val =~ /^(.*?)\./ and $fullKeysID{$1}
506 0 0 3 $items and $raf
518 3 3 3 $item->{'RefersTo'} and $item->{'RefersTo'}{$primary}
528 0 0 3 $item->{'Extents'} and @{$item->{'Extents'};}
556 3 0 0 defined $comp and $comp ^^ $item->{'ContentEncoding'}
566 0 0 0 $inflate and $stat == Compress::Zlib::Z_STREAM_END()
577 0 0 1 length $buff >= 4 and length $buff >= 4 + unpack("N", $buff)
604 0 0 3 defined $newVal and $changed ne $et->{'CHANGED'}
0 0 3 defined $newVal and $changed ne $et->{'CHANGED'} and $dirInfo{'DirLen'} || length $newVal
608 2 0 1 length $hdr and length $newVal
687 0 0 2 defined $newVal and $changed ne $et->{'CHANGED'}
705 1 0 0 $et->Options("Compress") and length $newVal
810 0 6 0 do { $tag ne 'hdlr' } && do { my $n = &Get32u($outfile, $pos) + length($add{$tag}); &Set32u($n, $outfile, $pos) }
918 23 0 0 $trailer and not ref $trailer
942 309 91 12 $addDirs->{'Keys'} and $curPath =~ /^MOV-Movie(-Meta)?$/
365 27 8 $addDirs->{'AudioKeys'} || $addDirs->{'VideoKeys'} and $curPath =~ /^MOV-Movie-Track(-Meta)?$/
372 0 6 $curPath eq "MOV-Movie-Track-Meta-ItemList" and $Image::ExifTool::QuickTime::avType{$et->{'MediaType'}}
979 36 0 6 $newTags->{$_}{'LangCode'} and $newTags->{$_}{'SrcTagInfo'}
1014 1802 0 0 $trailer and $lastPos >= $trailer->[1]
1019 1802 0 0 defined $atomCount and --$atomCount < 0
1802 0 0 defined $atomCount and --$atomCount < 0 and $dataPt
1027 412 0 0 $n == 4 and $hdr eq "\0\0\0\0"
1108 0 0 0 $got <= 256 and $size >= 1024
0 0 0 $got <= 256 and $size >= 1024 and $tag ne "mdat"
0 0 0 $got < 3000 and pack("N", $size) =~ /^]/
1122 0 0 0 $size > $maxReadLen and $got == 65536
1132 1253 0 111 $tag eq "hdlr" and length $buff >= 12
1253 0 111 $tag eq "hdlr" and length $buff >= 12 and @{$et->{'PATH'};}
0 68 43 $tag eq "hdlr" and length $buff >= 12 and @{$et->{'PATH'};} and $et->{'PATH'}[-1] eq "Media"
1152 0 0 0 $dirInfo->{'DirID'} and $dirInfo->{'DirID'} eq "moov"
0 0 0 $dirInfo->{'DirID'} and $dirInfo->{'DirID'} eq "moov" and length $buff > 8
1178 110 1236 18 $tagInfo and $tagInfo->{'WriteHook'}
1181 1254 74 36 not $tagInfo and $dirName eq "ItemList"
1328 0 36 not $tagInfo and $dirName eq "ItemList" and $et->{$keysGrp}
1206 0 21 10 $tagInfo && $tagInfo->{'SubDirectory'}
22 10 21 $dirName eq "UserData" and not $tagInfo && $tagInfo->{'SubDirectory'}
1216 74 1187 0 $tagInfo and $tagInfo->{'AddedUnknown'}
1220 1249 0 12 defined $itemIndex and $et->{'ItemInfo'}
1240 0 0 0 $item->{'RefersTo'} and $item->{'RefersTo'}{$primary}
6 0 0 not $dont and ($item->{'RefersTo'} and $item->{'RefersTo'}{$primary})
3 3 0 $dont != 1 and $pitem->{'RefersTo'}{$id}
1248 80 351 830 $tagInfo and !defined($tagInfo->{'Writable'}) || $tagInfo->{'Writable'}
1264 761 0 0 $tagInfo->{'DontRead'} and $trailer
761 0 0 $tagInfo->{'DontRead'} and $trailer and $base == $trailer->[1]
1300 685 0 76 $hdrLen and $hdrLen < $size
1304 750 0 11 $subdir->{'ByteOrder'} and $subdir->{'ByteOrder'} =~ /^Little/
1320 242 496 23 defined $newData and not length $newData
738 23 0 defined $newData and not length $newData and $tagInfo->{'Permanent'} || $tagTablePtr->{'PERMANENT'} && !defined($tagInfo->{'Permanent'})
1338 685 5 71 $start and defined $newData
690 71 0 $start and defined $newData and length $newData || defined $tagInfo->{'Permanent'} && !$tagInfo->{'Permanent'}
1345 459 257 45 $curPath eq $writePath and $addDirs->{$subName}
257 3 42 $curPath eq $writePath and $addDirs->{$subName} and $addDirs->{$subName} eq $dirName
1357 4 0 8 $dirInfo->{'HasData'} && $buff =~ /\0...data\0/s
1359 0 0 4 $tag =~ /^\xa9/ || $tagInfo->{'IText'} and $size >= ($tagInfo->{'IText'} || 4)
1369 4 1 3 $nvHash and not $didTag->{$nvHash}
1371 2 0 1 $nvHash->{'IsCreating'} and $et->IsOverwriting($nvHash)
1384 0 0 1 $1 and $1 ne "und"
1387 0 0 1 $2 and $2 ne "ZZ"
1413 2 2 4 not $nvHash and $nvHashNoLang
1414 0 0 4 $lang eq $undLang and not $ctry
0 0 4 $lang eq $undLang and not $ctry and not $didTag->{$nvHashNoLang}
1421 0 0 8 $type eq "data" and $len >= 16
1433 0 0 0 $tagInfo->{'Writable'} and $qtFormat{$tagInfo->{'Writable'}}
1443 2 1 5 $nvHash and $et->IsOverwriting($nvHash, $val)
1474 2 6 0 defined $newData and $pos < $size
1480 4 0 0 $tagInfo->{'IText'} and $tagInfo->{'IText'} >= 6
1495 4 0 0 $lang < 1024 and not $val =~ /^\xfe\xff/
1509 0 1 3 not $nvHash and $nvHashNoLang
1510 0 0 3 $lang eq $undLang and not $didTag->{$nvHashNoLang}
1526 1 8 3 $nvHash and defined $val
1533 0 0 3 defined $newData and not $didTag->{$nvHash}
1539 0 0 0 $format =~ /^string/ and not $tagInfo->{'Binary'}
0 0 0 $format =~ /^string/ and not $tagInfo->{'Binary'} and not $tagInfo->{'ValueConv'}
0 0 0 $format and not $tagInfo->{'Binary'}
1576 464 56 8 $sizeDiff > 0 and $tagInfo->{'PreservePadding'}
56 8 0 $sizeDiff > 0 and $tagInfo->{'PreservePadding'} and $et->Options("QuickTimePad")
1603 690 0 43 $parent eq "DataInfo" and length $buff >= 4
647 0 43 $tag eq "stsd" and length $buff >= 8
1618 0 0 43 $drefTbl and $$drefTbl[$drefIdx - 1]
1623 0 0 43 $dref->[1] == 1 && $dref->[0] ne 'rsrc'
1650 80 653 0 $tagInfo and $tagInfo->{'WriteLast'}
1667 0 0 0 $lastTag eq 'mdat' || $lastTag eq 'moov' and not $dataPt
0 0 0 $lastTag eq 'mdat' || $lastTag eq 'moov' and not $dataPt and !$tagTablePtr->{$tag} || ref $tagTablePtr->{$tag} eq 'HASH' && $tagTablePtr->{$tag}{'Unknown'}
1709 246 153 13 $canCreate and exists $et->{'EDIT_DIRS'}{$dirName} || $createKeys
1717 0 20 0 $curPath eq "$keysPath-Meta-ItemList" and $et->{$keysGrp}
1754 78 0 0 defined $tagInfo->{'CanCreate'} and not $tagInfo->{'CanCreate'}
1755 78 0 0 defined $tagInfo->{'MediaType'} and $et->{'MediaType'} ne $tagInfo->{'MediaType'}
1759 0 10 46 $nvHash and not $didTag->{$nvHash}
1760 18 0 28 $nvHash->{'IsCreating'} and $et->IsOverwriting($nvHash)
1775 0 0 2 $1 and $1 ne "und"
1778 0 0 2 $2 and $2 ne "ZZ"
1784 6 0 2 $tagInfo->{'IText'} and $tagInfo->{'IText'} >= 6
1817 13 0 9 $createKeys and $curPath eq $keysPath
13 2 7 $createKeys and $curPath eq $keysPath and $subName eq "Meta"
13 2 0 $createKeys and $curPath eq "$keysPath-Meta"
12 3 0 $subName eq "Meta" and $et->{'OPTIONS'}{'QuickTimeHandler'}
1830 0 0 12 $curPath eq $writePath and $addDirs->{$subName}
0 0 12 $curPath eq $writePath and $addDirs->{$subName} and $addDirs->{$subName} eq $dirName
1845 0 0 22 $newData and length $newData <= 2147483639
1854 0 0 3 $cond and $cond =~ m[=~\s*\/\^(.*)/]
1877 409 0 3 $curPath eq "MOV-Meta" and $et->{'EDIT_DIRS'}{'ItemInformation'}
1886 412 0 0 $term and length $$outfile
1944 0 1 2 $edit->[0] < $mdat->[1] || !$mdat->[1] and $edit->[1] > $mdat->[0]
0 1 0 $edit->[0] == $edit->[1] and $edit->[0] == $mdat->[0] || $edit->[0] == $mdat->[1]
1950 3 0 0 $edit->[1] > $mdat->[1] and $mdat->[1]
1996 0 14 5 defined $co->[4] and $co->[4] == $edit->[3]
2043 15 0 10 $_->[0] eq "uuid" and $_->[2] >= 24
2097 0 12 5 defined $id and $id == $mdat->[5]
2099 9 3 0 $pos == $mdat->[0] and $mdat->[0] != $mdat->[1]
2103 0 21 0 $pos >= $mdat->[0] and $pos <= $mdat->[1] || !$mdat->[1]
2105 18 0 0 $pos == $mdat->[1] and $i + 1 < @mdat
18 0 0 $pos == $mdat->[1] and $i + 1 < @mdat and $pos == $mdat[$i + 1][0]
2160 0 23 0 $rtnVal and $trailer
2163 0 0 0 $nvTrail->{'Value'} && $nvTrail->{'Value'}[0]
0 0 0 $nvTrail and not $nvTrail->{'Value'} && $nvTrail->{'Value'}[0]
2182 0 0 0 $raf->Read($buf2, $n) == $n and &Write($outfile, $buf2)
2207 23 0 0 $size < 8 and $size != 1
2215 14 0 9 $tag eq "ftyp" and $size >= 12
14 0 9 $tag eq "ftyp" and $size >= 12 and $size < 100000
0 0 9 $tag eq "ftyp" and $size >= 12 and $size < 100000 and $raf->Read($buff, $size - 8) == $size - 8
0 0 9 $tag eq "ftyp" and $size >= 12 and $size < 100000 and $raf->Read($buff, $size - 8) == $size - 8 and not $buff =~ /^(....)+(qt )/s

or 2 conditions

line l !l condition
188 24 68 $1 || '+'
339 0 2 $qtFormat{$format or 0} || 0
519 1 0 $item->{'ContentType'} || $item->{'Type'} || (next)
540 0 3 $item->{'BaseOffset'} || 0
797 0 2 $countNew || 0
903 412 0 $dirInfo->{'OutFile'} || (return 0)
907 70 342 $dirInfo->{'DirStart'} || 0
1190 6 5 $delCount || 0
1207 65 5 $delCount || 0
1211 18 3 $delCount || 0
1228 12 0 $items->{$primary} || {}
1235 12 0 $Image::ExifTool::QuickTime::dontInherit{$tag} || 0
1259 76 685 $subdir->{'Start'} || 0
1260 701 60 $dirInfo->{'Base'} || 0
1359 0 4 $tagInfo->{'IText'} || 4
1540 0 3 $tagInfo->{'IText'} || 0
1593 0 1 $writeLast || ''
1651 0 0 $writeLast || ''
1804 0 0 $writeLast || ''
1860 0 1 $writeLast || ''

or 3 conditions

line l !l&&r !l&&!r condition
153 4 0 0 @v == 2 or @v == 3
174 16 20 4 @a == 2 or @a == 3
239 0 0 9 $ver == 1 or $ver == 2
271 0 0 9 $ver == 1 or $ver == 2
276 9 0 0 not defined $minOffset or $minOffset > $extent_offset
318 4 469 170 $tagInfo->{'Format'} || $tagInfo->{'Writable'} || $tagInfo->{'Table'}{'FORMAT'}
334 0 2 30 $format and $format ne "string" or not $format and $writable and $writable ne "string"
335 0 2 0 $format || $writable
416 0 0 25 $len < 8 or $pos + $len > $dirLen
604 1 2 0 $dirInfo{'DirLen'} || length $newVal
648 3 1 2 $did{$name} or not $et->{'ADD_DIRS'}{$name}
650 4 0 0 $boxPos->{$_} or push @missing, $_
942 35 0 365 $addDirs->{'AudioKeys'} || $addDirs->{'VideoKeys'}
14 0 378 $curPath eq "MOV-Movie-Meta-ItemList" or $curPath eq "MOV-Movie-Track-Meta-ItemList" and $Image::ExifTool::QuickTime::avType{$et->{'MediaType'}}
962 1 2 16 $keysInfo{$tagInfo} || $tagInfo->{'SrcTagInfo'} && $keysInfo{$tagInfo->{'SrcTagInfo'}}
985 136 30 246 $curPath eq $writePath or $createKeys
1033 0 0 0 $n > 3 or $hdr ne "\0" x $n
1044 0 0 3 $hi or $lo > 2147483647
1108 0 0 0 $got <= 256 and $size >= 1024 and $tag ne "mdat" or $got < 3000 and pack("N", $size) =~ /^]/ and $type = "extraneous HTML"
1142 0 0 59 $tag eq "mfra" or $tag eq "moof"
0 0 59 $tag eq "sidx" or $tag eq "saio"
3 10 43 $tag eq "CTBO" or $tag eq "uuid"
0 43 0 not $flg or $flg == 1
1240 6 0 6 $id == $primary or not $dont and ($item->{'RefersTo'} and $item->{'RefersTo'}{$primary})
0 0 6 $id == $primary or not $dont and ($item->{'RefersTo'} and $item->{'RefersTo'}{$primary}) or $dont != 1 and $pitem->{'RefersTo'}{$id}
1248 1166 15 0 !defined($tagInfo->{'Writable'}) || $tagInfo->{'Writable'}
1258 288 473 0 $subdir->{'DirName'} || $tagInfo->{'Name'}
1320 0 0 23 $tagInfo->{'Permanent'} || $tagTablePtr->{'PERMANENT'} && !defined($tagInfo->{'Permanent'})
1330 0 0 0 $et->{'CUR_WRITE_GROUP'} || $dirName
1338 69 0 2 length $newData || defined $tagInfo->{'Permanent'} && !$tagInfo->{'Permanent'}
1353 7 5 408 $nvHash or $langTags{$tag}
5 0 408 $nvHash or $langTags{$tag} or $delGrp
1359 4 0 0 $tag =~ /^\xa9/ || $tagInfo->{'IText'}
1407 2 6 0 $nvHash or not $ctry
8 0 0 $nvHash or not $ctry or $lang ne $undLang
6 0 0 $nvHash or not $ctry or $lang ne $undLang or length $langCode == 2
1443 5 0 3 $nvHash and $et->IsOverwriting($nvHash, $val) or $delTag
1445 0 2 3 $delTag or not defined $newVal
2 0 3 $delTag or not defined $newVal or $didTag->{$nvHash}
1490 0 0 4 $len > $size - 4 or $len < 0
1522 0 0 0 $tag =~ /^\xa9/ or $tagInfo->{'IText'}
1529 3 0 0 defined $newData or $canCreate
1539 0 0 0 not $format or $format =~ /^string/ and not $tagInfo->{'Binary'} and not $tagInfo->{'ValueConv'}
1635 0 0 0 $et->{'CUR_WRITE_GROUP'} || $parent
1644 0 0 0 $et->{'CUR_WRITE_GROUP'} || $parent
1667 0 0 0 $lastTag eq 'mdat' || $lastTag eq 'moov'
0 0 0 !$tagTablePtr->{$tag} || ref $tagTablePtr->{$tag} eq 'HASH' && $tagTablePtr->{$tag}{'Unknown'}
1709 121 8 37 exists $et->{'EDIT_DIRS'}{$dirName} || $createKeys
1745 22 56 0 $dirs->{$tag} || $newTags->{$tag}
1780 6 0 2 $tag =~ /^\xa9/ or $tagInfo->{'IText'}
0 0 0 $ctry or $lang
1815 22 0 0 $subdir->{'DirName'} || $tagInfo->{'Name'}
1886 0 0 0 &Write($outfile, $term) or $rtnVal = $rtnErr, $err = 1
1892 29 34 0 $emptyMeta{$_} or $isEmpty = 0, last
1943 2 5 5 defined $mdat->[5] or $changed
1944 3 0 0 $edit->[0] < $mdat->[1] || !$mdat->[1]
1 0 0 $edit->[0] == $mdat->[0] || $edit->[0] == $mdat->[1]
2 0 1 $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]
2 0 3 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 0 0 3 $edit->[0] < $mdat->[0] or $edit->[1] > $mdat->[1] and $mdat->[1]
2062 9 0 3 &Get64u($outfile, $pos + 12) or $id == 1
9 0 3 &Get64u($outfile, $pos + 12) or $id == 1 or $id == 2
2064 0 0 0 $id == 1 or $id == 2
2103 18 0 3 $pos <= $mdat->[1] || !$mdat->[1]
2157 2 0 0 &Write($outfile, $writeLast) or $rtnVal = 0
2163 0 0 0 $et->{'DEL_GROUP'}{'Trailer'} or $et->{'DEL_GROUP'}{$trailer->[0]}
0 0 0 $et->{'DEL_GROUP'}{'Trailer'} or $et->{'DEL_GROUP'}{$trailer->[0]} or $nvTrail and not $nvTrail->{'Value'} && $nvTrail->{'Value'}[0]

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
556 0 0 0 0 $comp ^^ $item->{'ContentEncoding'}