summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorTulio Beloqui <tulio.beloqui@pexip.com>2020-12-18 13:06:35 +0100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-08-25 08:36:06 +0000
commit3b14a24630cc593e18338e2f09a5f0ba2a28816c (patch)
treedcfe6a7445218a5138e5007cdd43c0dfe81168ed /gst
parent3484f21b9545521394c9227a5a48616d26f95d87 (diff)
rtptwcc: fixed feedback packet count overflow that allowed late
packets to be processed Co-authored-by: Havard Graff <havard.graff@gmail.com> Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmanager/rtptwcc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/rtpmanager/rtptwcc.c b/gst/rtpmanager/rtptwcc.c
index 3bb054063..515c69b23 100644
--- a/gst/rtpmanager/rtptwcc.c
+++ b/gst/rtpmanager/rtptwcc.c
@@ -72,7 +72,7 @@ struct _RTPTWCCManager
guint max_packets_per_rtcp;
GArray *recv_packets;
- guint8 fb_pkt_count;
+ guint64 fb_pkt_count;
gint32 last_seqnum;
GArray *sent_packets;
@@ -438,7 +438,7 @@ rtp_twcc_manager_add_fci (RTPTWCCManager * twcc, GstRTCPPacket * packet)
GST_WRITE_UINT16_BE (header.base_seqnum, first->seqnum);
GST_WRITE_UINT16_BE (header.packet_count, packet_count);
GST_WRITE_UINT24_BE (header.base_time, base_time);
- GST_WRITE_UINT8 (header.fb_pkt_count, twcc->fb_pkt_count);
+ GST_WRITE_UINT8 (header.fb_pkt_count, twcc->fb_pkt_count % G_MAXUINT8);
base_time *= REF_TIME_UNIT;
ts_rounded = base_time;
@@ -446,7 +446,7 @@ rtp_twcc_manager_add_fci (RTPTWCCManager * twcc, GstRTCPPacket * packet)
GST_DEBUG ("Created TWCC feedback: base_seqnum: #%u, packet_count: %u, "
"base_time %" GST_TIME_FORMAT " fb_pkt_count: %u",
first->seqnum, packet_count, GST_TIME_ARGS (base_time),
- twcc->fb_pkt_count);
+ twcc->fb_pkt_count % G_MAXUINT8);
twcc->fb_pkt_count++;
twcc->expected_recv_seqnum = first->seqnum + packet_count;