Index: webrtc/video/receive_statistics_proxy.cc |
diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc |
index 4757efa81b6cf3435212fea2f3e4dbb53d283734..8648fb62fbd7651366c515be0f3037a1ed007013 100644 |
--- a/webrtc/video/receive_statistics_proxy.cc |
+++ b/webrtc/video/receive_statistics_proxy.cc |
@@ -247,7 +247,7 @@ void ReceiveStatisticsProxy::OnDecodedFrame() { |
rtc::CritScope lock(&crit_); |
decode_fps_estimator_.Update(1, now); |
- stats_.decode_frame_rate = decode_fps_estimator_.Rate(now); |
+ stats_.decode_frame_rate = decode_fps_estimator_.Rate(now).value_or(1); |
stefan-webrtc
2016/06/02 07:16:42
I'm not convinced this is correct. What if there a
sprang_webrtc
2016/06/02 08:09:32
Yeah, you're right. I'll change it to default zero
stefan-webrtc
2016/06/02 08:14:39
So, will we now ever be able to measure 1 fps? :)
sprang
2016/06/02 09:00:51
Not if the actual rate is <= 1 fps. But slightly m
stefan-webrtc
2016/06/02 09:05:51
Not sure. I'm mostly thinking whether it would mak
sprang_webrtc
2016/06/02 12:23:50
Done. PTAL
|
} |
void ReceiveStatisticsProxy::OnRenderedFrame(int width, int height) { |
@@ -257,7 +257,7 @@ void ReceiveStatisticsProxy::OnRenderedFrame(int width, int height) { |
rtc::CritScope lock(&crit_); |
renders_fps_estimator_.Update(1, now); |
- stats_.render_frame_rate = renders_fps_estimator_.Rate(now); |
+ stats_.render_frame_rate = renders_fps_estimator_.Rate(now).value_or(1); |
render_width_counter_.Add(width); |
render_height_counter_.Add(height); |
render_fps_tracker_.AddSamples(1); |