WWBN / AVideo-Encoder-Network

Encoder Network Servers for AVideo Platform Open-Source
https://network.avideo.com
GNU General Public License v3.0
14 stars 40 forks source link

Handle memory as float instead of int to avoid 2GB limit bug #32

Closed manu0401 closed 3 years ago

manu0401 commented 3 years ago

Using intval($value->serverStatus->memory->memFreeBytes) causes a 32 bit overflow if there is more then 2GB. Use less-precise but more robust floatval() instead of intval()

While there, add a test to prefer a more concurent encoder, and refactor the code to make it more readable