Ticket #10155: round_off_content_length.patch

File round_off_content_length.patch, 595 bytes (added by Peter Townsend <elpinkus@…>, 10 years ago)
  • ./mythweb/modules/stream/stream_flv.pl

     
    142142    if ($dur && $dur =~ /\d*:\d*:.*/) {
    143143        @times = split(':',$dur);
    144144        $lengthSec = $times[0]*3600+$times[1]*60+$times[2];
    145         $size = 1.05*int($lengthSec*($vbitrate*1024+$abitrate*1024)/8);
     145        $size = int(1.05*$lengthSec*($vbitrate*1024+$abitrate*1024)/8);
    146146        print header(-type => 'video/x-flv','Content-Length' => $size);
    147147    } else {
    148148        print header(-type => 'video/x-flv');