rtpjitterbuffer: fix bug in reschedule_timer
authorHavard Graff <havard.graff@gmail.com>
Thu, 3 Nov 2016 15:33:53 +0000 (16:33 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 4 Nov 2016 14:40:14 +0000 (16:40 +0200)
commitbea35f97c8eeca4f78a99d61d4bd04a2be2124cf
treec205059cd0a59071d0fd70799ca52a74fa90cb76
parent752dd15c54238c389f676105867ff7815d623ced
rtpjitterbuffer: fix bug in reschedule_timer

The new timeout is always going to be (timeout + delay), however, the
old behavior compared the current timeout to just (timeout), basically
being (delay) off.

This would happen if rtx-delay == rtx-retry-timeout, with the result that
a second rtx attempt for any buffers would be scheduled immediately instead
of after rtx-delay ms.

Simply calculate (new_timeout = timeout + delay) and then use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=773905
gst/rtpmanager/gstrtpjitterbuffer.c
tests/check/elements/rtpjitterbuffer.c