[vlc-devel] [PATCH] Only use --rtsp-client-port when sending RTSP SETUP request

Julian Scheel julian at jusst.de
Tue Jul 7 10:21:04 CEST 2015


On 06.07.2015 19:51, David R Robison wrote:
> From: David R Robison <david.robison at openroadsconsulting.com>
>
> ---
>   modules/access/live555.cpp | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
> index fef590a..d3259c7 100644
> --- a/modules/access/live555.cpp
> +++ b/modules/access/live555.cpp
> @@ -740,12 +740,6 @@ static int SessionsSetup( demux_t *p_demux )
>               ;
>           else continue;
>
> -        if( i_client_port != -1 )
> -        {
> -            sub->setClientPortNum( i_client_port );
> -            i_client_port += 2;
> -        }
> -
>           if( strcasestr( sub->codecName(), "REAL" ) )
>           {
>               msg_Info( p_demux, "real codec detected, using real-RTSP instead" );
> @@ -783,6 +777,13 @@ static int SessionsSetup( demux_t *p_demux )
>               /* Issue the SETUP */
>               if( p_sys->rtsp )
>               {
> +
> +                if( i_client_port != -1 )
> +                {
> +                    sub->setClientPortNum( i_client_port );
> +                    i_client_port += 2;
> +                }
> +
>                   p_sys->rtsp->sendSetupCommand( *sub, default_live555_callback, False,
>                                                  toBool( b_rtsp_tcp ),
>                                                  toBool( p_sys->b_force_mcast && !b_rtsp_tcp ) );
>

What's the point of moving the setClientPortNum call? Besides that it 
wouldn't be called when initiate() fails or loading of live555 is 
aborted because of REAL codec being used it shouldn't change anything.
So is this just for cosmetics or has it some functional relevance?

For things like this it's really nice to add a short comment explaining 
the reson for reshuffling code into the commit message.

-Julian




More information about the vlc-devel mailing list