rtpjitterbuffer: Fix rtp_jitter_buffer_get_ts_diff() fill level calculation
The head of the queue is the oldest packet (as in lowest seqnum), the tail is the newest packet. To calculate the fill level, we should calculate tail-head while considering wraparounds. Not the other way around. Other code is already doing this in the correct order. https://bugzilla.gnome.org/show_bug.cgi?id=764889
This commit is contained in:
parent
95dc198563
commit
4a0de53cc1
@ -1206,8 +1206,8 @@ rtp_jitter_buffer_get_ts_diff (RTPJitterBuffer * jbuf)
|
||||
|
||||
g_return_val_if_fail (jbuf != NULL, 0);
|
||||
|
||||
high_buf = (RTPJitterBufferItem *) g_queue_peek_head_link (jbuf->packets);
|
||||
low_buf = (RTPJitterBufferItem *) g_queue_peek_tail_link (jbuf->packets);
|
||||
high_buf = (RTPJitterBufferItem *) g_queue_peek_tail_link (jbuf->packets);
|
||||
low_buf = (RTPJitterBufferItem *) g_queue_peek_head_link (jbuf->packets);
|
||||
|
||||
if (!high_buf || !low_buf || high_buf == low_buf)
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user