[vlc-devel] commit: RTP: handle odd port numbers correctly ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Jun 16 19:29:08 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Mon Jun 16 20:30:59 2008 +0300| [289f23911af9ce924e74b9ccf698b4b2bf3258be]

RTP: handle odd port numbers correctly

We should also open a RTCP socket, if only to not send ICMP errors back

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=289f23911af9ce924e74b9ccf698b4b2bf3258be
---

 modules/demux/rtp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/modules/demux/rtp.c b/modules/demux/rtp.c
index c94f053..f900afb 100644
--- a/modules/demux/rtp.c
+++ b/modules/demux/rtp.c
@@ -174,6 +174,7 @@ static int Open (vlc_object_t *obj)
         dport = extract_port (&dhost);
     if (dport == 0)
         dport = 5004; /* avt-profile-1 port */
+    dport = (dport + 1) & ~1; /* RTP is on the "next" even port */
 
     /* Try to connect */
     int fd = -1;




More information about the vlc-devel mailing list