From 5137f8b6c04babae6f07236f6fd135f7bc8de2f2 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 20 Jun 2016 02:27:25 -0700 Subject: [PATCH] UI: Fix case where invalid bitrate would be shown Fixes a case where an astronomically large bitrate could be shown unintentionally. --- obs/window-basic-status-bar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/obs/window-basic-status-bar.cpp b/obs/window-basic-status-bar.cpp index 660544f69..880aa0833 100644 --- a/obs/window-basic-status-bar.cpp +++ b/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;