Changeset 16994 for gsdl/trunk/perllib


Ignore:
Timestamp:
2008-08-25T14:45:14+12:00 (16 years ago)
Author:
kjdon
Message:

add a test for invalid real media file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/RealMediaPlugin.pm

    r16956 r16994  
    9191    my $text = "";
    9292    my $real_media = rm::Header::PurePerl->new($filename_full_path);
     93    if (!defined $real_media || !defined $real_media->info) {
     94    my $outhandle = $self->{'outhandle'};
     95    print $outhandle "RealMediaPlugin: $filename_no_path is not a real media file\n";
     96    return undef;
     97    }
    9398    foreach my $key (keys %{$real_media->info})
    9499    {
     
    97102    $text .= "$key: $value\n";
    98103    }
    99 
     104   
    100105    $doc_obj->add_utf8_text($top_section, "<pre>\n$text\n</pre>");
    101106    $doc_obj->add_metadata($top_section, "FileFormat", "RealMedia");
Note: See TracChangeset for help on using the changeset viewer.