Browse Source

UI: Fix case where invalid bitrate would be shown

Fixes a case where an astronomically large bitrate could be shown
unintentionally.
jp9000 9 years ago
parent
commit
5137f8b6c0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      obs/window-basic-status-bar.cpp

+ 2 - 0
obs/window-basic-status-bar.cpp

@@ -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;