The branch, master has been updated
via b3ea5584929f16785cc45ad386998ff42fa72110 (commit)
from 673f28b6cb6e20f5a695a90d144a6158bdf987fe (commit)
- Log -----------------------------------------------------------------
commit b3ea5584929f16785cc45ad386998ff42fa72110
Author: Jack Lau <[email protected]>
AuthorDate: Sat Aug 23 09:09:47 2025 +0800
Commit: Jack Lau <[email protected]>
CommitDate: Sat Aug 23 17:20:32 2025 +0800
avformat/whip: fix ssrc might be same
use audio_ssrc + 1 for video_ssrc to avoid ssrc collision
See RFC 3550 Section 8,
The SSRC identifier carried in the RTP header and in various fields
of RTCP packets is a random 32 bit number that is required to be
globally unique within an RTP session.
simply + 1 also can get an unique ssrc, and faster than generating
new unique ssrc.
Signed-off-by: Jack Lau <[email protected]>
diff --git a/libavformat/whip.c b/libavformat/whip.c
index e2fa774c6f..69f1010ee8 100644
--- a/libavformat/whip.c
+++ b/libavformat/whip.c
@@ -577,7 +577,7 @@ static int generate_sdp_offer(AVFormatContext *s)
av_lfg_get(&whip->rnd));
whip->audio_ssrc = av_lfg_get(&whip->rnd);
- whip->video_ssrc = av_lfg_get(&whip->rnd);
+ whip->video_ssrc = whip->audio_ssrc + 1;
whip->audio_payload_type = WHIP_RTP_PAYLOAD_TYPE_OPUS;
whip->video_payload_type = WHIP_RTP_PAYLOAD_TYPE_H264;
-----------------------------------------------------------------------
Summary of changes:
libavformat/whip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]