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

Ronald S. Bultje rsbultje
Mon Sep 1 01:48:45 CEST 2008


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[];

  if (transport_type == UDP){
    snprintf(transport+strlen(transport), ...);
  } else if (transport_type == TCP){
    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.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rtsp-remove-protocolcat.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080831/43e3d99a/attachment.asc>

More information about the ffmpeg-devel mailing list