Do not call OnDecoderTiming before timing values are set.

Wait until first frame is decoded to avoid include zeros in stats.

BUG=b/32659204

Review-Url: https://codereview.webrtc.org/2582313002
Cr-Commit-Position: refs/heads/master@{#15752}
This commit is contained in:
asapersson
2016-12-22 01:26:18 -08:00
committed by Commit bot
parent c37ad499da
commit 8d5608880f
3 changed files with 12 additions and 9 deletions

View File

@ -74,12 +74,13 @@ void VideoReceiver::Process() {
int jitter_buffer_ms;
int min_playout_delay_ms;
int render_delay_ms;
_timing->GetTimings(&decode_ms, &max_decode_ms, &current_delay_ms,
&target_delay_ms, &jitter_buffer_ms,
&min_playout_delay_ms, &render_delay_ms);
_decoderTimingCallback->OnDecoderTiming(
decode_ms, max_decode_ms, current_delay_ms, target_delay_ms,
jitter_buffer_ms, min_playout_delay_ms, render_delay_ms);
if (_timing->GetTimings(&decode_ms, &max_decode_ms, &current_delay_ms,
&target_delay_ms, &jitter_buffer_ms,
&min_playout_delay_ms, &render_delay_ms)) {
_decoderTimingCallback->OnDecoderTiming(
decode_ms, max_decode_ms, current_delay_ms, target_delay_ms,
jitter_buffer_ms, min_playout_delay_ms, render_delay_ms);
}
}
}