[MPlayer-dev-eng] [PATCH] fix rtsp_port for multiple streams

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Sep 20 19:48:31 CEST 2012


On Thu, Sep 20, 2012 at 01:44:50PM -0400, Tamas Vincze wrote:
> Hi:
> 
> The attached patch fixes a problem when playing multiple streams
> (separate audio and video) over RTSP with user-specified -rtsp_port
> <num>. Previously the same port was assigned to both streams that
> resulted in a conflict.
> 
> Tamas
> 
> 

> --- demux_rtp.cpp.orig	2012-03-05 13:14:38.000000000 -0500
> +++ demux_rtp.cpp	2012-09-20 13:34:05.886112488 -0400
> @@ -222,7 +222,10 @@
>        }
>  
>        if (rtsp_port)
> +      {
>            subsession->setClientPortNum (rtsp_port);
> +          rtsp_port += 2;	// RTP+RTCP uses two ports; give next stream the next two ports
> +      }

I am not completely sure and haven't tested, but:
I think that will cause strange behaviour when doing
-rtsp_port <something> url1 url2
in that url2 will not use <something> but instead <something+4> or so.


More information about the MPlayer-dev-eng mailing list