Changeset 16994

Show
Ignore:
Timestamp:
25.08.2008 14:45:14 (11 years ago)
Author:
kjdon
Message:

add a test for invalid real media file

Files:
1 modified

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");