Commit 5f112496 authored by paalmm's avatar paalmm

quickfix

parent b1c5cab5
......@@ -173,6 +173,7 @@ $SIG{TERM} = sub { $uninterrupted=0; # return if $nkill++ < 1;
$SIG{ALRM} = sub {
# Writes stats to file if option XML is given. -PMM
# die "No packets received" if $n_packets < 1;
print "alarmen går ! \n";
$uninterrupted=0;
if (! $endstream) { # Changed logic 20120706:1007 CDT
$endstream=1;
......@@ -1583,7 +1584,8 @@ sub pkt_stats {
$setuptime{$f}=tv_interval ( $tjoined{$f}, $tstart{$f}) * 10**3;
}
printf "setup $f : %.3f\n", $setuptime{$f} if $opt_debug;
alarm($opt_last) if $opt_last;
#print "hei hei \n";
#alarm($opt_last) if $opt_last;
}
}
$tend{$f} = $tc;
......@@ -1664,22 +1666,21 @@ sub pkt_stats {
&burst($f);
}
if ($opt_period){
my $span=$last_us{$f}-$first_us{$f};
my $tmp2 = $span/10**6;
if ($tmp2 > $opt_period){
&mpeg_debug() if $opt_debug;
&display_stats() if !$endstream;
&init_stats($f);
$pinterval=$interval;
$pinterval{$f}=$interval;
$endstream = $opt_nperiod && $interval >= $opt_nperiod;
$interval=int($us/10**6 / $opt_period);
if ($interval > $pinterval){
&mpeg_debug() if $opt_debug;
&display_stats() if !$endstream;
&init_stats($f);
$pinterval=$interval;
$pinterval{$f}=$interval;
$endstream = $opt_nperiod && $interval >= $opt_nperiod;
}
$pus=$us;
$psec=$sec;
$pmtime{$f}=$mtime{$f} if $opt_rtp || $opt_crude;
$pseq_num{$f}= $seq_num{$f} if $opt_rtp || $opt_crude;
$pus{$f}=$us;
}
$pus=$us;
$psec=$sec;
$pmtime{$f}=$mtime{$f} if $opt_rtp || $opt_crude;
$pseq_num{$f}= $seq_num{$f} if $opt_rtp || $opt_crude;
$pus{$f}=$us;
} # of pkt_stats
sub do_math{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment