This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 2501954d49 avformat/rtpdec: fix RTCP RR cumulative packet loss clamping
2501954d49 is described below
commit 2501954d493d21d02b4092f537369a075b28c220
Author: Nariman-Sayed <[email protected]>
AuthorDate: Mon Mar 9 04:11:28 2026 +0200
Commit: Marton Balint <[email protected]>
CommitDate: Mon Mar 23 19:49:25 2026 +0000
avformat/rtpdec: fix RTCP RR cumulative packet loss clamping
Per RFC 3550 Appendix A.3, the cumulative number of packets lost is a
signed 24-bit field. Clamp to signed 24-bit range using av_clip_intp2
and av_zero_extend to handle duplicate packets correctly.
---
libavformat/rtpdec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 5872c0f59c..3fd817f93c 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -355,8 +355,7 @@ int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s,
URLContext *fd,
// RFC 1889/p64
extended_max = stats->cycles + stats->max_seq;
expected = extended_max - stats->base_seq;
- lost = expected - stats->received;
- lost = FFMIN(lost, 0xffffff); // clamp it since it's only
24 bits...
+ lost = av_zero_extend(av_clip_intp2(expected -
stats->received, 23), 24);
expected_interval = expected - stats->expected_prior;
stats->expected_prior = expected;
received_interval = stats->received - stats->received_prior;
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]