[vlc-devel] commit: RTP: allow receiving RTP on odd ports for compatibility ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Jan 11 19:38:20 CET 2009


vlc | branch: 0.9-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Jan 11 20:29:11 2009 +0200| [b17e7f5aa2352e2d427f1036ffe18a49ac828c29] | committer: Rémi Denis-Courmont 

RTP: allow receiving RTP on odd ports for compatibility

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

 NEWS                |    4 ++++
 modules/demux/rtp.c |    9 +++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index b42b0ba..c2a9d3a 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,10 @@ Mac OS X Interface:
 New Localizations:
  * Indonesian
 
+Various bugfixes:
+ * Support for receiving RTP packets on odd port numbers.
+ * Lots of small bugfixes.
+
 
 Changes between 0.9.6 and 0.9.8a:
 ---------------------------------
diff --git a/modules/demux/rtp.c b/modules/demux/rtp.c
index 5f8959d..97e1a6e 100644
--- a/modules/demux/rtp.c
+++ b/modules/demux/rtp.c
@@ -182,12 +182,13 @@ static int Open (vlc_object_t *obj)
     {
         case IPPROTO_UDP:
         case IPPROTO_UDPLITE:
-            fd = net_OpenDgram (obj, dhost, (dport + 1) & ~1,
-                                shost, (sport + 1) & ~1, AF_UNSPEC, tp);
+            fd = net_OpenDgram (obj, dhost, dport, shost, sport,
+                                AF_UNSPEC, tp);
             if (fd == -1)
                 break;
-            rtcp_fd = net_OpenDgram (obj, dhost, dport | 1, shost,
-                                     sport ? (sport | 1) : 0, AF_UNSPEC, tp);
+            if ((dport & 1) == 0)
+                rtcp_fd = net_OpenDgram (obj, dhost, dport + 1, shost, 0,
+                                         AF_UNSPEC, tp);
             break;
 
          case IPPROTO_DCCP:




More information about the vlc-devel mailing list