mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
rtpjitterbuffer: Return 100 if high-level is 0 instead of dividing by zero
This commit is contained in:
parent
3a09d334a0
commit
0a12e69024
1 changed files with 3 additions and 0 deletions
|
@ -763,6 +763,9 @@ rtp_jitter_buffer_get_percent (RTPJitterBuffer * jbuf)
|
|||
gint percent;
|
||||
guint64 level;
|
||||
|
||||
if (G_UNLIKELY (jbuf->high_level == 0))
|
||||
return 100;
|
||||
|
||||
level = get_buffer_level (jbuf);
|
||||
percent = (level * 100 / jbuf->high_level);
|
||||
percent = MIN (percent, 100);
|
||||
|
|
Loading…
Reference in a new issue