Skip to content

Commit

Permalink
Fixes #9207, this fixes the bitrate calculation (1024, not 1000), and…
Browse files Browse the repository at this point in the history
… adds in a bit of overhead to allow the stream to fully complete with format overhead.
  • Loading branch information
kormoc committed Dec 21, 2010
1 parent 6aba7cf commit ff42fd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/stream/stream_flv.pl
Expand Up @@ -99,7 +99,7 @@
if ($dur && $dur =~ /\d*:\d*:.*/) {
@times = split(':',$dur);
$lengthSec = $times[0]*3600+$times[1]*60+$times[2];
$size = int($lengthSec*($vbitrate*1000+$abitrate*1000)/8);
$size = 1.05*int($lengthSec*($vbitrate*1024+$abitrate*1024)/8);
print header(-type => 'video/x-flv','Content-Length' => $size);
} else {
print header(-type => 'video/x-flv');
Expand Down

0 comments on commit ff42fd9

Please sign in to comment.