[FFmpeg-cvslog] rtpdec: Use our own SSRC in the SDES field when sending RRs

Martin Storsjö git at videolan.org
Sat Jan 21 23:21:14 CET 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Sat Jan 21 17:20:45 2012 +0200| [ad7beb2cac1563e87171a4d044a6d526527d81d9] | committer: Martin Storsjö

rtpdec: Use our own SSRC in the SDES field when sending RRs

The s->ssrc field is the sender's SSRC, we use ssrc + 1 to get
a collision free "unique" SSRC for ourselves in the RR part.
The SDES block in the RTCP packet should describe ourselves,
not the sender.

This was fixed for the RR part in 952139a3226b, but wasn't
fixed for the SDES part until now.

This could cause some Axis cameras to send RTCP BYE packets
to us due to the SSRC collision.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad7beb2cac1563e87171a4d044a6d526527d81d9
---

 libavformat/rtpdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 7e8b52a..3442c9b 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -299,7 +299,7 @@ int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
     avio_w8(pb, RTCP_SDES);
     len = strlen(s->hostname);
     avio_wb16(pb, (6 + len + 3) / 4); /* length in words - 1 */
-    avio_wb32(pb, s->ssrc);
+    avio_wb32(pb, s->ssrc + 1);
     avio_w8(pb, 0x01);
     avio_w8(pb, len);
     avio_write(pb, s->hostname, len);



More information about the ffmpeg-cvslog mailing list