Ignore:
Timestamp:
2021-02-26T19:39:51+13:00 (3 years ago)
Author:
anupama
Message:

Committing the improvements to EmbeddedMetaPlugin's processing of Keywords vs other metadata fields. Keywords were literally stored as arrays of words rather than phrases in PDFs (at least in Diego's sample PDF), whereas other meta fields like Subjects and Creators stored them as arrays of phrases. To get both to work, Kathy updated EXIF to a newer version, to retrieve the actual EXIF values stored in the PDF. And Kathy and Dr Bainbridge came up with a new option that I added called apply_join_before_split_to_metafields that's a regex which can list the metadata fields to apply the join_before_split to and whcih previously always got applied to all metadata fields. Now it's applied to any *Keywords metafields by default, as that's the metafield we have experience of that behaves differently to the others, as it stores by word instead of phrases. Tested on Diego's sample PDF. Diego has double-checked it to works on his sample PDF too, setting the split char to ; and turning on the join_before_split and leaving apply_join_before_split_to_metafields at its default of .*Keywords. File changes are strings.properties for the tooltip, the plugin introducing the option and working with it and Kathy's EXIF updates affecting cpan/File and cpan/Image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cpan/Image/ExifTool/H264.pm

    r24107 r34921  
    1313#               6) Dave Nicholson private communication
    1414#               7) http://www.freepatentsonline.com/20050076039.pdf
     15#               8) Michael Reitinger private communication (RX100)
    1516#
    1617# Glossary:     RBSP = Raw Byte Sequence Payload
     
    2324use Image::ExifTool qw(:DataAccess :Utils);
    2425use Image::ExifTool::Exif;
    25 
    26 $VERSION = '1.06';
     26use Image::ExifTool::GPS;
     27
     28$VERSION = '1.17';
    2729
    2830sub ProcessSEI($$);
     
    3537    0x0108 => 'Sony',
    3638    0x1011 => 'Canon',
     39    0x1104 => 'JVC', #Rob Lewis
    3740);
    3841
     
    6265        compared to the challenge of actually decoding the data!]>  This information
    6366        may exist at regular intervals through the entire video, but only the first
    64         occurrence is extracted unless the ExtractEmbedded (-ee) option is used (in
     67        occurrence is extracted unless the L<ExtractEmbedded|../ExifTool.html#ExtractEmbedded> (-ee) option is used (in
    6568        which case subsequent occurrences are extracted as sub-documents).
    6669    },
     
    8285    # 0x11 - TitleRemainTime (ref 7)
    8386    # 0x12 - TitleChapterTotalNo (ref 7)
    84     # 0x13 - TitleTimecode
    85     # 0x14 - TitleBinaryGroup
     87    0x13 => {
     88        Name => 'TimeCode',
     89        Notes => 'hours:minutes:seconds:frames',
     90        ValueConv => 'sprintf("%.2x:%.2x:%.2x:%.2x",reverse unpack("C*",$val))',
     91    },
     92    # 0x14 - TitleBinaryGroup - val: 0x00000000,0x14200130
    8693    # 0x15 - TitleCassetteNo (ref 7)
    8794    # 0x16-0x17 - TitleSoftID (ref 7)
     
    95102        # first byte is timezone information:
    96103        #   0x80 - unused
    97         #   0x40 - DST flag (not currently decoded)
     104        #   0x40 - DST flag
    98105        #   0x20 - TimeZoneSign
    99106        #   0x1e - TimeZoneValue
     
    101108        ValueConv => q{
    102109            my ($tz, @a) = unpack('C*',$val);
    103             return sprintf('%.2x%.2x:%.2x:%.2x %.2x:%.2x:%.2x%s%.2d:%s', @a,
     110            return sprintf('%.2x%.2x:%.2x:%.2x %.2x:%.2x:%.2x%s%.2d:%s%s', @a,
    104111                           $tz & 0x20 ? '-' : '+', ($tz >> 1) & 0x0f,
    105                            $tz & 0x01 ? '30' : '00');
     112                           $tz & 0x01 ? '30' : '00',
     113                           $tz & 0x40 ? ' DST' : '');
    106114        },
    107115        PrintConv => '$self->ConvertDateTime($val)',
     
    127135        SubDirectory => { TagTable => 'Image::ExifTool::H264::Camera2' },
    128136    },
    129     # 0x73 Lens - val: 0x75ffffd3,0x0effffd3,0x59ffffd3,0x79ffffd3,0xffffffd3...
    130     # 0x74 Gain
     137    # 0x73 Lens - val: 0x04ffffd3,0x0effffd3,0x15ffffd3,0x41ffffd3,0x52ffffd3,0x59ffffd3,0x65ffffd3,0x71ffffd3,0x75ffffd3,0x79ffffd3,0x7fffffd3,0xffffffd3...
     138    # 0x74 Gain - val: 0xb8ffff0f
    131139    # 0x75 Pedestal
    132140    # 0x76 Gamma
     
    292300        Notes => 'combined with tags 0xbc and 0xbd',
    293301        ValueConv => 'Image::ExifTool::GPS::ConvertTimeStamp($val)',
     302        PrintConv => 'Image::ExifTool::GPS::PrintTimeStamp($val)',
    294303    },
    295304    0xbe => {
     
    368377    },
    369378    # 0xc9-0xcf - GPSOption
     379    # 0xc9 - val: 0x001d0203
     380    0xca => { #PH (Sony DSC-HX7V)
     381        Name => 'GPSDateStamp',
     382        Format => 'string',
     383        Groups => { 1 => 'GPS', 2 => 'Time' },
     384        Combine => 2,    # the next 2 tags contain the rest of the string
     385        Notes => 'combined with tags 0xcb and 0xcc',
     386        ValueConv => 'Image::ExifTool::Exif::ExifDate($val)',
     387    },
    370388    0xe0 => {
    371389        Name => 'MakeModel',
     
    374392    # 0xe1-0xef - MakerOption
    375393    # 0xe1 - val: 0x01000670,0x01000678,0x06ffffff,0x01ffffff,0x01000020,0x01000400...
    376     # 0xe2-0xe8 - val: 0x00000000 in many samples
    377394    0xe1 => { #6
    378395        Name => 'RecInfo',
     
    381398        SubDirectory => { TagTable => 'Image::ExifTool::H264::RecInfo' },
    382399    },
     400    # 0xe2-0xe8 - val: 0x00000000 in many samples
     401    # 0xe2 - val: 0x00000000,0x01000000,0x01010000,0x8080900c,0x8080a074
     402    # 0xe3 - val: 0x00801f89,0x00801f8b,0x00c01f89,0xc9c01f80
    383403    0xe4 => { #PH
    384404        Name => 'Model',
    385         Condition => '$$self{Make} eq "Sony"',
     405        Condition => '$$self{Make} eq "Sony"', # (possibly also Canon models?)
    386406        Description => 'Camera Model Name',
    387         Notes => 'Sony cameras only, combined with tags 0xe5 and 0xe6',
     407        Notes => 'Sony only, combined with tags 0xe5 and 0xe6',
    388408        Format => 'string',
    389409        Combine => 2, # (not sure about 0xe6, but include it just in case)
    390410        RawConv => '$val eq "" ? undef : $val',
    391411    },
     412    # 0xeb - val: 0x008a0a00,0x0a300000,0x508a0a00,0x52880a00,0x528a0a00
     413    # 0xec - val: 0x0b700000
     414    # 0xed - val: 0x0ce0f819
    392415    0xee => { #6 (HFS200)
    393416        Name => 'FrameInfo',
     
    396419        SubDirectory => { TagTable => 'Image::ExifTool::H264::FrameInfo' },
    397420    },
     421    # 0xef - val: 0x01c00000,0x0e00000c
    398422);
    399423
     
    417441        Name => 'Gain',
    418442        Mask => 0x0f,
     443        # (0x0f would translate to 42 dB, but this value is used by the Sony
     444        #  HXR-NX5U for any out-of-range value such as -6 dB or "hyper gain" - PH)
    419445        ValueConv => '($val - 1) * 3',
    420         PrintConv => '"$val dB"',
     446        PrintConv => '$val==42 ? "Out of range" : "$val dB"',
    421447    },
    422448    1.1 => {
    423449        Name => 'ExposureProgram',
    424450        Mask => 0xf0,
    425         ValueConv => '$val == 0xf0 ? undef : $val',
    426         PrintConv => {
    427             0x00 => 'Program AE',
    428             0x10 => 'Gain', #?
    429             0x20 => 'Shutter speed priority AE',
    430             0x30 => 'Aperture-priority AE',
    431             0x40 => 'Manual',
     451        ValueConv => '$val == 15 ? undef : $val',
     452        PrintConv => {
     453            0 => 'Program AE',
     454            1 => 'Gain', #?
     455            2 => 'Shutter speed priority AE',
     456            3 => 'Aperture-priority AE',
     457            4 => 'Manual',
    432458        },
    433459    },
     
    435461        Name => 'WhiteBalance',
    436462        Mask => 0xe0,
    437         ValueConv => '$val == 0xe0 ? undef : $val',
    438         PrintConv => {
    439             0x00 => 'Auto',
    440             0x20 => 'Hold',
    441             0x40 => '1-Push',
    442             0x60 => 'Daylight',
     463        ValueConv => '$val == 7 ? undef : $val',
     464        PrintConv => {
     465            0 => 'Auto',
     466            1 => 'Hold',
     467            2 => '1-Push',
     468            3 => 'Daylight',
    443469        },
    444470    },
     
    448474        PrintConv => q{
    449475            my $foc = ($val & 0x7e) / (($val & 0x01) ? 40 : 400);
    450             return ($val & 0x80 ? 'Manual' : 'Auto') . " ($foc)";
     476            return(($val & 0x80 ? 'Manual' : 'Auto') . " ($foc)");
    451477        },
    452478    },
     
    462488    1 => {
    463489        Name => 'ImageStabilization',
     490        PrintHex => 1,
    464491        PrintConv => {
    465492            0 => 'Off',
     493            0x3f => 'On (0x3f)', #8
     494            0xbf => 'Off (0xbf)', #8
    466495            0xff => 'n/a',
    467496            OTHER => sub {
     
    485514        Mask => 0x7fff, # (what is bit 0x8000 for?)
    486515        RawConv => '$val == 0x7fff ? undef : $val', #7
    487         ValueConv => '$val / 33640', #PH (conversion factor determined empirically)
     516        ValueConv => '$val / 28125', #PH (Vixia HF G30, ref forum5588) (was $val/33640 until 9.49)
    488517        PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
    489518    },
     
    502531        PrintConv => \%convMake,
    503532    },
    504     # 1 => ModelIDCode according to ref 4/5 (I think not)
    505     # vals: 0x3001 - Sony HDR-CX105E/TG3E/XR500V
     533    # 1 => ModelIDCode according to ref 4/5 (I think not - PH)
     534    # 1 => { Name => 'ModelIDCode', PrintConv => 'sprintf("%.4x",$val)' },
     535    # vals: 0x0313 - various Pansonic HDC models
     536    #       0x0345 - Panasonic HC-V7272
     537    #       0x0414 - Panasonic AG-AF100
     538    #       0x0591 - various Panasonic DMC models
     539    #       0x0802 - Panasonic DMC-TZ60 with GPS information off
     540    #       0x0803 - Panasonic DMC-TZ60 with GPS information on
     541    #       0x3001 - various Sony DSC, HDR, NEX and SLT models
     542    #       0x3003 - various Sony DSC models
     543    #       0x3100 - various Sony DSC, ILCE, NEX and SLT models
    506544    #       0x1000 - Sony HDR-UX1
     545    #       0x2000 - Canon HF100 (60i)
    507546    #       0x3000 - Canon HF100 (30p)
    508     #       0x2000 - Canon HF100 (60i)
    509547    #       0x3101 - Canon HFM300 (PH, all qualities and frame rates)
     548    #       0x3102 - Canon HFS200
     549    #       0x4300 - Canon HFG30
    510550);
    511551
     
    686726#------------------------------------------------------------------------------
    687727# Parse H.264 sequence parameter set RBSP (ref 1)
    688 # Inputs) 0) ExifTool ref, 1) tag table ref, 2) data ref
     728# Inputs: 0) ExifTool ref, 1) tag table ref, 2) data ref
     729# Notes: All this just to get the image size!
    689730sub ParseSeqParamSet($$$)
    690731{
    691     my ($exifTool, $tagTablePtr, $dataPt) = @_;
     732    my ($et, $tagTablePtr, $dataPt) = @_;
    692733    # initialize our bitstream object
    693734    my $bstr = NewBitStream($dataPt) or return;
    694735    my ($t, $i, $j, $n);
    695736    # the messy nature of H.264 encoding makes it difficult to use
    696     # data-driven structure parsing, so I code it explicitely (yuck!)
     737    # data-driven structure parsing, so I code it explicitly (yuck!)
    697738    $t = GetIntN($bstr, 8);         # profile_idc
    698739    GetIntN($bstr, 16);             # constraints and level_idc
     
    746787    return unless $$bstr{Mask};
    747788    if ($w>=160 and $w<=4096 and $h>=120 and $h<=3072) {
    748         $exifTool->HandleTag($tagTablePtr, ImageWidth => $w);
    749         $exifTool->HandleTag($tagTablePtr, ImageHeight => $h);
     789        $et->HandleTag($tagTablePtr, ImageWidth => $w);
     790        $et->HandleTag($tagTablePtr, ImageHeight => $h);
    750791        # (whew! -- so much work just to get ImageSize!!)
    751792    }
     
    778819    if ($t) {
    779820        return if BitsLeft($bstr) < 65;
    780         $$exifTool{VUI_units} = GetIntN($bstr, 32); # num_units_in_tick
    781         $$exifTool{VUI_scale} = GetIntN($bstr, 32); # time_scale
     821        $$et{VUI_units} = GetIntN($bstr, 32); # num_units_in_tick
     822        $$et{VUI_scale} = GetIntN($bstr, 32); # time_scale
    782823        GetIntN($bstr, 1);          # fixed_frame_rate_flag
    783824    }
     
    786827        $t = GetIntN($bstr, 1);     # nal_/vcl_hrd_parameters_present_flag
    787828        if ($t) {
    788             $$exifTool{VUI_hard} = 1;
     829            $$et{VUI_hard} = 1;
    789830            $hard = 1;
    790831            $n = GetGolomb($bstr);  # cpb_cnt_minus1
     
    796837            }
    797838            GetIntN($bstr, 5);      # initial_cpb_removal_delay_length_minus1
    798             $$exifTool{VUI_clen} = GetIntN($bstr, 5); # cpb_removal_delay_length_minus1
    799             $$exifTool{VUI_dlen} = GetIntN($bstr, 5); # dpb_output_delay_length_minus1
    800             $$exifTool{VUI_toff} = GetIntN($bstr, 5); # time_offset_length
     839            $$et{VUI_clen} = GetIntN($bstr, 5); # cpb_removal_delay_length_minus1
     840            $$et{VUI_dlen} = GetIntN($bstr, 5); # dpb_output_delay_length_minus1
     841            $$et{VUI_toff} = GetIntN($bstr, 5); # time_offset_length
    801842        }
    802843    }
    803844    GetIntN($bstr, 1) if $hard;     # low_delay_hrd_flag
    804     $$exifTool{VUI_pic} = GetIntN($bstr, 1);    # pic_struct_present_flag
     845    $$et{VUI_pic} = GetIntN($bstr, 1);    # pic_struct_present_flag
    805846    # (don't yet decode the rest of the vui data)
    806847}
     
    808849#------------------------------------------------------------------------------
    809850# Parse H.264 picture timing SEI message (payload type 1) (ref 1)
    810 # Inputs) 0) ExifTool ref, 1) data ref
     851# Inputs: 0) ExifTool ref, 1) data ref
     852# Notes: this routine is for test purposes only, and not called unless the
     853#        $parsePictureTiming flag is set
    811854sub ParsePictureTiming($$)
    812855{
    813     my ($exifTool, $dataPt) = @_;
     856    my ($et, $dataPt) = @_;
    814857    my $bstr = NewBitStream($dataPt) or return;
    815858    my ($i, $t, $n);
     
    817860    # exist if the VUI hardware parameters are present, or if
    818861    # "determined by the application, by some means not specified" -- WTF??
    819     if ($$exifTool{VUI_hard}) {
    820         GetIntN($bstr, $$exifTool{VUI_clen} + 1);   # cpb_removal_delay
    821         GetIntN($bstr, $$exifTool{VUI_dlen} + 1);   # dpb_output_delay
    822     }
    823     if ($$exifTool{VUI_pic}) {
     862    if ($$et{VUI_hard}) {
     863        GetIntN($bstr, $$et{VUI_clen} + 1);   # cpb_removal_delay
     864        GetIntN($bstr, $$et{VUI_dlen} + 1);   # dpb_output_delay
     865    }
     866    if ($$et{VUI_pic}) {
    824867        $t = GetIntN($bstr, 4);     # pic_struct
    825868        # determine NumClockTS ($n)
     
    853896                }
    854897            }
    855             if ($$exifTool{VUI_toff}) {
    856                 $o = GetIntN($bstr, $$exifTool{VUI_toff});  # time_offset
     898            if ($$et{VUI_toff}) {
     899                $o = GetIntN($bstr, $$et{VUI_toff});  # time_offset
    857900            }
    858901            last;   # only parse the first clock timestamp found
     
    863906#------------------------------------------------------------------------------
    864907# Process H.264 Supplementary Enhancement Information (ref 1/PH)
    865 # Inputs: 0) Exiftool ref, 1) dirInfo ref, 2) tag table ref
     908# Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
    866909# Returns: 1 if we processed payload type 5
     910# Payload types:
     911#   0 - buffer period
     912#   1 - pic timing
     913#   2 - pan scan rect
     914#   3 - filler payload
     915#   4 - user data registered itu t t35
     916#   5 - user data unregistered
     917#   6 - recovery point
     918#   7 - dec ref pic marking repetition
     919#   8 - spare pic
     920#   9 - sene info
     921#  10 - sub seq info
     922#  11 - sub seq layer characteristics
     923#  12 - sub seq characteristics
     924#  13 - full frame freeze
     925#  14 - full frame freeze release
     926#  15 - full frame snapshot
     927#  16 - progressive refinement segment start
     928#  17 - progressive refinement segment end
     929#  18 - motion constrained slice group set
    867930sub ProcessSEI($$)
    868931{
    869     my ($exifTool, $dirInfo) = @_;
     932    my ($et, $dirInfo) = @_;
    870933    my $dataPt = $$dirInfo{DataPt};
    871934    my $end = length($$dataPt);
     
    891954        }
    892955        return 0 if $pos + $size > $end;
     956        $et->VPrint(1,"    (SEI type $type)\n");
    893957        if ($type == 1) {                   # picture timing information
    894958            if ($parsePictureTiming) {
    895959                my $buff = substr($$dataPt, $pos, $size);
    896                 ParsePictureTiming($exifTool, $dataPt);
     960                ParsePictureTiming($et, $dataPt);
    897961            }
    898962        } elsif ($type == 5) {              # unregistered user data
     
    904968    # look for our 16-byte UUID
    905969    # - plus "MDPM" for "ModifiedDVPackMeta"
    906     # - plus "GA94" for closed-caption data (not currently decoded)
     970    # - plus "GA94" for closed-caption data (currently not decoded)
    907971    return 0 unless $size > 20 and substr($$dataPt, $pos, 20) eq
    908972        "\x17\xee\x8c\x60\xf8\x4d\x11\xd9\x8c\xd6\x08\0\x20\x0c\x9a\x66MDPM";
    909 
    910     # load the GPS module because it contains conversion routines and
    911     # Composite tags needed for a number of tags we may be extracting
    912     require Image::ExifTool::GPS;
    913973#
    914974# parse the MDPM records in the UUID 17ee8c60f84d11d98cd60800200c9a66
     
    916976#
    917977    my $tagTablePtr = GetTagTable('Image::ExifTool::H264::MDPM');
    918     my $oldIndent = $$exifTool{INDENT};
    919     $$exifTool{INDENT} .= '| ';
     978    my $oldIndent = $$et{INDENT};
     979    $$et{INDENT} .= '| ';
    920980    $end = $pos + $size;    # end of payload
    921981    $pos += 20;             # skip UUID + "MDPM"
    922982    my $num = Get8u($dataPt, $pos++);   # get entry count
    923983    my $lastTag = 0;
    924     $exifTool->VerboseDir('MDPM', $num) if $exifTool->Options('Verbose');
     984    $et->VerboseDir('MDPM', $num) if $et->Options('Verbose');
    925985    # walk through entries in the MDPM payload
    926986    for ($index=0; $index<$num and $pos<$end; ++$index) {
    927987        my $tag = Get8u($dataPt, $pos);
    928988        if ($tag <= $lastTag) { # should be in numerical order (PH)
    929             $exifTool->Warn('Entries in MDPM directory are out of sequence');
     989            $et->Warn('Entries in MDPM directory are out of sequence');
    930990            last;
    931991        }
     
    933993        my $buff = substr($$dataPt, $pos + 1, 4);
    934994        my $from;
    935         my $tagInfo = $exifTool->GetTagInfo($tagTablePtr, $tag);
     995        my $tagInfo = $et->GetTagInfo($tagTablePtr, $tag);
    936996        if ($tagInfo) {
    937997            # use our own print conversion for Unknown tags
     
    9531013                --$combine;
    9541014            }
    955             $exifTool->HandleTag($tagTablePtr, $tag, undef,
     1015            $et->HandleTag($tagTablePtr, $tag, undef,
    9561016                TagInfo => $tagInfo,
    9571017                DataPt  => \$buff,
     
    9621022        $pos += 5;
    9631023    }
    964     $$exifTool{INDENT} = $oldIndent;
     1024    $$et{INDENT} = $oldIndent;
    9651025    return 1;
    9661026}
     
    9721032sub ParseH264Video($$)
    9731033{
    974     my ($exifTool, $dataPt) = @_;
    975     my $verbose = $exifTool->Options('Verbose');
    976     my $out = $exifTool->Options('TextOut');
     1034    my ($et, $dataPt) = @_;
     1035    my $verbose = $et->Options('Verbose');
     1036    my $out = $et->Options('TextOut');
    9771037    my $tagTablePtr = GetTagTable('Image::ExifTool::H264::Main');
    9781038    my %parseNalUnit = ( 0x06 => 1, 0x07 => 1 );    # NAL unit types to parse
     
    9961056        ++$pos;
    9971057        # check forbidden_zero_bit
    998         $nal_unit_type & 0x80 and $exifTool->Warn('H264 forbidden bit error'), last;
     1058        $nal_unit_type & 0x80 and $et->Warn('H264 forbidden bit error'), last;
    9991059        $nal_unit_type &= 0x1f;
    10001060        # ignore this NAL unit unless we will parse it
     
    10111071        if ($verbose > 1) {
    10121072            printf $out "  NAL Unit Type: 0x%x (%d bytes)\n",$nal_unit_type, length $buff;
    1013             my %parms = ( Out => $out );
    1014             $parms{MaxLen} = 96 if $verbose < 4;
    1015             Image::ExifTool::HexDump(\$buff, undef, %parms) if $verbose > 2;
     1073            $et->VerboseDump(\$buff);
    10161074        }
    10171075        pos($$dataPt) = $pos = $nextPos;
     
    10191077        if ($nal_unit_type == 0x06) {       # sei_rbsp (supplemental enhancement info)
    10201078
    1021             if ($$exifTool{GotNAL06}) {
     1079            if ($$et{GotNAL06}) {
    10221080                # process only the first SEI unless ExtractEmbedded is set
    1023                 next unless $exifTool->Options('ExtractEmbedded');
    1024                 $$exifTool{DOC_NUM} = $$exifTool{GotNAL06};
     1081                next unless $et->Options('ExtractEmbedded');
     1082                $$et{DOC_NUM} = $$et{GotNAL06};
    10251083            }
    1026             $foundUserData = ProcessSEI($exifTool, { DataPt => \$buff } );
    1027             delete $$exifTool{DOC_NUM};
     1084            $foundUserData = ProcessSEI($et, { DataPt => \$buff } );
     1085            delete $$et{DOC_NUM};
    10281086            # keep parsing SEI's until we find the user data
    10291087            next unless $foundUserData;
    1030             $$exifTool{GotNAL06} = ($$exifTool{GotNAL06} || 0) + 1;
     1088            $$et{GotNAL06} = ($$et{GotNAL06} || 0) + 1;
    10311089
    10321090        } elsif ($nal_unit_type == 0x07) {  # sequence_parameter_set_rbsp
    10331091
    10341092            # process this NAL unit type only once
    1035             next if $$exifTool{GotNAL07};
    1036             $$exifTool{GotNAL07} = 1;
    1037             ParseSeqParamSet($exifTool, $tagTablePtr, \$buff);
     1093            next if $$et{GotNAL07};
     1094            $$et{GotNAL07} = 1;
     1095            ParseSeqParamSet($et, $tagTablePtr, \$buff);
    10381096        }
    10391097        # we were successful, so don't parse this NAL unit type again
     
    10421100    # parse one extra H264 frame if we didn't find the user data in this one
    10431101    # (Panasonic cameras don't put the SEI in the first frame)
    1044     return 0 if $foundUserData or $$exifTool{ParsedH264};
    1045     $$exifTool{ParsedH264} = 1;
     1102    return 0 if $foundUserData or $$et{ParsedH264};
     1103    $$et{ParsedH264} = 1;
    10461104    return 1;
    10471105}
     
    10661124=head1 AUTHOR
    10671125
    1068 Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca)
     1126Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
    10691127
    10701128This library is free software; you can redistribute it and/or modify it
Note: See TracChangeset for help on using the changeset viewer.