RTP: when sending to RTP an odd port we need to specify a=rtcp
[vlc.git] / modules / stream_out / rtp.c
index 8ec54d9..1d10655 100644 (file)
@@ -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 );