After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764889 - rtpjitterbuffer: Drops wrong number of packets with drop-on-latency=true
rtpjitterbuffer: Drops wrong number of packets with drop-on-latency=true
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: 1.8.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-11 11:42 UTC by dyudaken
Modified: 2016-04-13 06:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description dyudaken 2016-04-11 11:42:36 UTC
rtp_jitter_buffer_get_ts_diff should return the difference in rtptime from the oldest -> newest packet.
In the current implementation, it returns the opposite.

To test this you can do:
gst-launch-1.0 audiotestsrc num-buffers=1 ! audioconvert ! avenc_g722  ! rtpg722pay mtu=9999 ! rtpjitterbuffer drop-on-latency=true latency=500 ! fakesink dump=true
AND
gst-launch-1.0 audiotestsrc num-buffers=1 ! audioconvert ! avenc_g722  ! rtpg722pay mtu=9999 ! rtpjitterbuffer drop-on-latency=false latency=500 ! fakesink dump=true

Since there is no latency, these should both dump the same number of buffers (4 locally), but with this bug and drop-on-latency=true, it dumps 3.

I suspect in the code that the g_queue_peek_head_link/g_queue_peek_tail_link should be reversed
Comment 1 Sebastian Dröge (slomo) 2016-04-12 07:18:55 UTC
commit 4a0de53cc17fa4ee9762df0f58d7a29729eb4939
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Apr 12 10:15:39 2016 +0300

    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