rtp: basepay: Fix off-by-one with seqnum-offset

Setting a seqnum-offset of 1 would've caused the first packet to have a
seqnum of 2 instead of 1.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
This commit is contained in:
Sebastian Dröge 2024-08-07 10:52:33 +03:00 committed by GStreamer Marge Bot
parent c5163a73ee
commit de42ae432c

View file

@ -1103,7 +1103,7 @@ impl RtpBasePay2 {
timestamp_offset,
seqnum_offset,
use_stream_time: settings.onvif_no_rate_control || !settings.scale_rtptime,
last_seqnum: Wrapping(seqnum_offset),
last_seqnum: Wrapping(seqnum_offset) - Wrapping(1),
last_timestamp: Wrapping(timestamp_offset),
};