From 1bb0d2961923cd85bf7ac28d26d73492f4da14e1 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Fri, 3 Jun 2022 09:58:41 +0200 Subject: [PATCH] rtp: add function to calc sequence number diff (#385) --- include/re_rtp.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/re_rtp.h b/include/re_rtp.h index 3e5acb1fa..715e9afa3 100644 --- a/include/re_rtp.h +++ b/include/re_rtp.h @@ -254,3 +254,9 @@ static inline bool rtp_pt_is_rtcp(uint8_t pt) { return 64 <= pt && pt <= 95; } + + +static inline int16_t rtp_seq_diff(uint16_t x, uint16_t y) +{ + return (int16_t)(y - x); +}