[FFmpeg-devel] [PATCH] remove transport concatenation dead code

Ronald S. Bultje rsbultje
Tue Sep 2 14:56:07 CEST 2008


On Sun, Aug 31, 2008 at 7:48 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> at some point (long ago), transports were flags and it was apparently
> planned to ask rtsp servers for multiple transports and just use
> whatever worked for them. That code never did what it was supposed to
> and nowadays, we don't use the flags anymore (see
> make_setup_request()). However, the code for transport concatenation
> is still there, it looks like this:
> for(..) {
>  char transport[];
>  transport[0]=0;
>  if (transport_type == UDP){
>    if(transport[0]!=0)...
>    snprintf(transport+strlen(transport), ...);
>  } else if (transport_type == TCP){
>    if(transport[0]!=0)...
>    snprintf(transport+strlen(transport), ...);
>  } else ... etc.
> }
> All code assuming the transport is already filled in is useless
> because only one of the conditions is true at any given time, not more
> (hence the if/else if/else if, not if/if/if). Attached patch removes
> the dead code.

This one also needs review. It's kind of obvious so I could just apply
it in 2-3 days but I'd prefer a review anyway, rookie here.


More information about the ffmpeg-devel mailing list