[vlc-devel] commit: RTP: when sending to RTP an odd port we need to specify a=rtcp ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Jan 7 20:24:31 CET 2009
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Jan 7 21:11:17 2009 +0200| [ca15fe099037f17537a6f3d2a6c7a17948e37d16] | committer: Rémi Denis-Courmont
RTP: when sending to RTP an odd port we need to specify a=rtcp
Otherwise the receiver would -in principle- try to receive RTP on the
next (plus one) even port, whereas the m= line port would be used for
RTCP. We could also pass a=rtcp for the normal even/RTP & odd/RTCP
ports setup, but that can only confuse receivers with no gain.
Note that receivers may not parse the a=rtcp parameter in any case. In
fact, VLC does not parse the a=rtcp field to this day. In any case,
sending RTP to an *even* port is the only safely interoperable option.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca15fe099037f17537a6f3d2a6c7a17948e37d16
---
modules/stream_out/rtp.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 8ec54d9..1d10655 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -783,6 +783,9 @@ char *SDPGenerate( const sout_stream_t *p_stream, const char *rtsp_url )
id->psz_enc, id->i_clock_rate, id->i_channels,
id->psz_fmtp);
+ if( !p_sys->rtcp_mux && (id->i_port & 1) ) /* cf RFC4566 §5.14 */
+ sdp_AddAttribute ( &psz_sdp, "rtcp", "%u", id->i_port + 1 );
+
if( rtsp_url != NULL )
{
assert( strlen( rtsp_url ) > 0 );
More information about the vlc-devel
mailing list