rtpjitterbuffer: fix divide-by-zero
authorHavard Graff <havard@pexip.com>
Sun, 25 Apr 2021 00:16:45 +0000 (02:16 +0200)
committerHavard Graff <havard.graff@gmail.com>
Sun, 25 Apr 2021 00:21:04 +0000 (02:21 +0200)
commitd75c67847966ea25a0fb42194fb196a2a2a4e2b6
tree35cbb6f8e0d821dcc78e60fa14fcd1ef44de56a8
parent1368b4214b0aefdad387a4a1e6b882a357ec48f1
rtpjitterbuffer: fix divide-by-zero

The estimated packet-duration can sometimes end up as zero, and dividing
by that is never a good idea...

The test reproduces the scenario, and the fix is easy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/966>
gst/rtpmanager/gstrtpjitterbuffer.c
tests/check/elements/rtpjitterbuffer.c