Commit 0a12e690 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

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

parent 3a09d334
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment