rtpbuffer: Initialize extended timestamp to the first wraparound period
authorSebastian Dröge <sebastian@centricular.com>
Mon, 17 Oct 2022 15:38:43 +0000 (18:38 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 18 Oct 2022 06:09:08 +0000 (06:09 +0000)
commit4df3da3bab8b8f3aa03437f1aa345cba47a7d000
tree88bb72374f4f5e0347aba48ea772910929490789
parentd586c2cc28c33fa0f4685a1734e2e11b47bd39d6
rtpbuffer: Initialize extended timestamp to the first wraparound period

This allows correct handling of wrapping around backwards during the
first wraparound period and avoids the infamous "Cannot unwrap, any
wrapping took place yet" error message.

It allows makes sure that for actual timestamp jumps a valid value is
returned instead of 0, which then allows the caller to handle it
properly. Not having this can have the caller see the same timestamp (0)
for a very long time, which for example can cause rtpjitterbuffer to
output the same timestamp for a very long time.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1500

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3202>
subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbuffer.c
subprojects/gst-plugins-base/tests/check/libs/rtp.c