Ticket #9036: stream_fvl.pl.diff
File stream_fvl.pl.diff, 859 bytes (added by , 14 years ago) |
---|
-
(a) /home/jean/Downloads/stream_flv.download vs. (b) stream_flv.pl
a b 2 2 # 3 3 # MythWeb Streaming/Download module 4 4 # 5 5 # @url $URL$ 6 6 # @date $Date$ 7 7 # @version $Revision$ 8 8 # @author $Author$ 9 9 # 10 10 11 use Math::Round qw( round_even);11 use Math::Round qw(nearest_floor); 12 12 13 13 our $ffmpeg_pid; 14 14 … … 49 49 $sh->execute($chanid,$starttime); 50 50 $x = $sh->fetchrow_array; 51 51 $y = $sh->fetchrow_array if ($x); 52 $width = round_even($width); 52 $width = nearest_floor(2,$width); 53 53 54 if ($x && $y) { 54 $height = round_even($width * ($y/$x));55 $height = nearest_floor(2,$width * ($y/$x)); 55 56 } else { 56 $height = round_even($width * 3/4);57 $height = nearest_floor(2,$width * 3/4); 57 58 } 58 59 $sh->finish(); 59 60