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

Tamas Vincze tom at vincze.org
Thu Sep 20 20:08:13 CEST 2012


You're right. I never used more than one URL.
Anyone with more insight into libmpdemux want to offer some help please?

> 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.
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list