mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue