Initialize NetEqNetworkStatistics fields. Bug: None Change-Id: I40fd4039db67d92de41ea637832840b1623c76ce Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/460000 Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47260}
diff --git a/api/neteq/neteq.h b/api/neteq/neteq.h index 0afb04c..b0aed23 100644 --- a/api/neteq/neteq.h +++ b/api/neteq/neteq.h
@@ -31,28 +31,29 @@ class AudioFrame; struct NetEqNetworkStatistics { - uint16_t current_buffer_size_ms; // Current jitter buffer size in ms. - uint16_t preferred_buffer_size_ms; // Target buffer size in ms. - uint16_t jitter_peaks_found; // 1 if adding extra delay due to peaky - // jitter; 0 otherwise. - uint16_t expand_rate; // Fraction (of original stream) of synthesized - // audio inserted through expansion (in Q14). - uint16_t speech_expand_rate; // Fraction (of original stream) of synthesized - // speech inserted through expansion (in Q14). - uint16_t preemptive_rate; // Fraction of data inserted through pre-emptive - // expansion (in Q14). - uint16_t accelerate_rate; // Fraction of data removed through acceleration - // (in Q14). - uint16_t secondary_decoded_rate; // Fraction of data coming from FEC/RED - // decoding (in Q14). - uint16_t secondary_discarded_rate; // Fraction of discarded FEC/RED data (in - // Q14). + uint16_t current_buffer_size_ms = 0; // Current jitter buffer size in ms. + uint16_t preferred_buffer_size_ms = 0; // Target buffer size in ms. + uint16_t jitter_peaks_found = + 0; // 1 if adding extra delay due to peaky jitter; 0 otherwise. + uint16_t expand_rate = 0; // Fraction (of original stream) of synthesized + // audio inserted through expansion (in Q14). + uint16_t speech_expand_rate = + 0; // Fraction (of original stream) of synthesized speech inserted + // through expansion (in Q14). + uint16_t preemptive_rate = + 0; // Fraction of data inserted through preemptive expansion (in Q14). + uint16_t accelerate_rate = + 0; // Fraction of data removed through acceleration (in Q14). + uint16_t secondary_decoded_rate = + 0; // Fraction of data coming from FEC/RED decoding (in Q14). + uint16_t secondary_discarded_rate = + 0; // Fraction of discarded FEC/RED data (in Q14). // Statistics for packet waiting times, i.e., the time between a packet // arrives until it is decoded. - int mean_waiting_time_ms; - int median_waiting_time_ms; - int min_waiting_time_ms; - int max_waiting_time_ms; + int mean_waiting_time_ms = 0; + int median_waiting_time_ms = 0; + int min_waiting_time_ms = 0; + int max_waiting_time_ms = 0; }; // NetEq statistics that persist over the lifetime of the class.