Need to convert bit_rate to an integer

This commit is contained in:
Calvin Walton 2015-09-25 14:08:17 -04:00 committed by Felipe Cecagno
parent 30e6a98a8b
commit 43e943d61d

View File

@ -183,7 +183,7 @@ module BigBlueButton
# wav files generated by freeswitch can have incorrect length
# field if longer than 4GB, so recalculate based on filesize (ouch!)
audio_size = info[:format][:size] - 44 # wav header is 44 bytes.
info[:duration] = (audio_size.to_r * 8 / info[:audio][:bit_rate] * 1000).to_i
info[:duration] = (audio_size.to_r * 8 / info[:audio][:bit_rate].to_i * 1000).to_i
else
info[:duration] = (info[:format][:duration].to_r * 1000).to_i
end