File: leak.pl

package info (click to toggle)
libaudio-scan-perl 0.93%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,152 kB
  • sloc: ansic: 11,482; perl: 241; sh: 48; makefile: 2
file content (29 lines) | stat: -rwxr-xr-x 568 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/perl

use lib qw(blib/lib blib/arch);
use Audio::Scan;
use Time::HiRes qw(sleep);

my $file = shift;

$ENV{AUDIO_SCAN_NO_ARTWORK} = 1;

for ( 1..50000 ) {
    my $s = Audio::Scan->scan($file);
    
    # Also test in no artwork mode
    #{
    #    local $ENV{AUDIO_SCAN_NO_ARTWORK} = 1;
    #    $s = Audio::Scan->scan($file);
    #}
    
    # Test find_frame doesn't leak
    if ( $file =~ /\.m4a$/ ) {
        Audio::Scan->find_frame_return_info( $file, 10 );
    }
    else {
        Audio::Scan->find_frame( $file, 10 );
    }
    
    sleep 0.001;
}