rtpjitterbuffer: Return 100 if high-level is 0 instead of dividing by zero

This commit is contained in:
Sebastian Dröge 2010-02-23 17:19:14 +01:00
parent 3a09d334a0
commit 0a12e69024

View file

@ -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);