Invalid current time and length in VLM web interface due to signed int overflow
Overview
VLM web interface reports incorrect times for the broadcasts. Although they are reported correctly in the windows GUI, it seems that the integers are overflowing in the web UI and returning as negatives.
Reproduce
If you create a broadcast in VLM with a file that's pretty large (say 2.5 hours or larger) and start playing it, you will see this.
if you look at the broadcast in the Windows GUI, it will have the correct time. If you look at the broadcast in the web-based (http://host:8080/vlm.html) interface, you will see that the times are incorrect.
The telnet interface aslo returns the wrong length.
For instance, a broadcast of a 25 minute .mpg has length: 1,500,567,588 a broadcast of 2 hours, 38 minute .mpg has length: 917,578,977
Example XML output
Notice the negative values:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<vlm>
<broadcast name="ev_1160776" enabled="yes" loop="no">
<output>#transcode{vcodec=WMV2,vb=512,scale=1,acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=mmsh,mux=asfh,dst=:5555/ev_1160776}}</output>
<inputs>
<input>C:\videofiles\evitap4-vl3_160752462_1160770178_1250kbps.mpg</input>
</inputs>
<options>
</options>
<instances>
</instances>
</broadcast>
<broadcast name="b1" enabled="yes" loop="no">
<output>#duplicate{dst=std{access=mmsh,mux=ts,dst=:1234}}</output>
<inputs>
<input>C:\videofiles\live.mpg</input>
</inputs>
<options>
</options>
<instances>
<instance name="default" state="playing" position="0.254585" time="-1874501026" length="917578977" rate="1000" title="0" chapter="0" seekable="1" playlistindex="1" />
</instances>
</broadcast>
</vlm>
time attribute is incorrect
<instance name="default" state="playing" position="0.255890" time="-1862093169" length="917578977" rate="1000" title="0" chapter="0" seekable="1" playlistindex="1"/>