UI: Fix case where invalid bitrate would be shown

Fixes a case where an astronomically large bitrate could be shown
unintentionally.
master
jp9000 2016-06-20 02:27:25 -07:00
parent 605590606f
commit 5137f8b6c0
1 changed files with 2 additions and 0 deletions

View File

@ -114,6 +114,8 @@ void OBSBasicStatusBar::UpdateBandwidth()
uint64_t bytesSent = obs_output_get_total_bytes(streamOutput);
uint64_t bytesSentTime = os_gettime_ns();
if (bytesSent < lastBytesSent)
bytesSent = 0;
if (bytesSent == 0)
lastBytesSent = 0;