Skip to content

Commit ff42fd9

Browse files
committed
Fixes #9207, this fixes the bitrate calculation (1024, not 1000), and adds in a bit of overhead to allow the stream to fully complete with format overhead.
1 parent 6aba7cf commit ff42fd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/stream/stream_flv.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
if ($dur && $dur =~ /\d*:\d*:.*/) {
100100
@times = split(':',$dur);
101101
$lengthSec = $times[0]*3600+$times[1]*60+$times[2];
102-
$size = int($lengthSec*($vbitrate*1000+$abitrate*1000)/8);
102+
$size = 1.05*int($lengthSec*($vbitrate*1024+$abitrate*1024)/8);
103103
print header(-type => 'video/x-flv','Content-Length' => $size);
104104
} else {
105105
print header(-type => 'video/x-flv');

0 commit comments

Comments
 (0)