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

Michael Niedermayer michaelni
Wed Sep 3 01:47:06 CEST 2008


On Tue, Sep 02, 2008 at 08:56:07AM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> 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.

it does look ok but iam really just replying so i dont need to keep track of
this until luca replies ;)

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080903/3716ebfb/attachment.pgp>



More information about the ffmpeg-devel mailing list