mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-03 13:16:04 +00:00
rtpstats: guard against division by zero
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/646>
This commit is contained in:
parent
e45cc475bd
commit
57eebe8b05
|
@ -622,8 +622,10 @@ rtp_twcc_stats_calculate_windowed_stats (RTPTWCCStats * stats)
|
|||
stats->avg_delta_of_delta = avg_delta_of_delta;
|
||||
}
|
||||
|
||||
if (local_duration > 0)
|
||||
stats->bitrate_sent =
|
||||
gst_util_uint64_scale (bits_sent, GST_SECOND, local_duration);
|
||||
if (remote_duration > 0)
|
||||
stats->bitrate_recv =
|
||||
gst_util_uint64_scale (bits_recv, GST_SECOND, remote_duration);
|
||||
|
||||
|
|
Loading…
Reference in a new issue