Ticket #9036: stream_fvl.pl.diff

File stream_fvl.pl.diff, 859 bytes (added by anonymous, 9 years ago)

Diff

  • (a) /home/jean/Downloads/stream_flv.download vs. (b) stream_flv.pl

    a b  
    22#
    33# MythWeb Streaming/Download module
    44#
    55# @url       $URL$
    66# @date      $Date$
    77# @version   $Revision$
    88# @author    $Author$
    99#
    1010
    11     use Math::Round qw(round_even);
     11    use Math::Round qw(nearest_floor);
    1212
    1313    our $ffmpeg_pid;
    1414
     
    4949    $sh->execute($chanid,$starttime);
    5050    $x = $sh->fetchrow_array;
    5151    $y = $sh->fetchrow_array if ($x);
    52     $width = round_even($width);
     52    $width = nearest_floor(2,$width);
     53
    5354    if ($x && $y) {
    54         $height = round_even($width * ($y/$x));
     55        $height = nearest_floor(2,$width * ($y/$x));
    5556    } else {
    56         $height = round_even($width * 3/4);
     57        $height = nearest_floor(2,$width * 3/4);
    5758    }
    5859    $sh->finish();
    5960