[FFmpeg-devel] [PATCH] RTSP alternate protocol 2-3/3

Michael Niedermayer michaelni
Sun Mar 2 03:49:46 CET 2008


On Sat, Mar 01, 2008 at 09:37:10PM -0500, Ronald S. Bultje wrote:
> Hi Michael,
> 
> On Sat, Mar 1, 2008 at 7:53 PM, Michael Niedermayer <michaelni at gmx.at>
> wrote:
> 
> > On Thu, Feb 14, 2008 at 09:01:00AM -0500, Ronald S. Bultje wrote:
> > [...]
> > > @@ -1075,9 +1079,18 @@
> > >          goto fail;
> > >      }
> > >
> > > -    err = make_setup_request(s, host, port, protocol_mask);
> > > -    if (err)
> > > +    do {
> > > +        int protocol = protocol_mask & ~(protocol_mask - 1);
> > > +
> > > +    err = make_setup_request(s, host, port, protocol);
> > > +    if (err < 0)
> > >          goto fail;
> > > +        protocol_mask &= ~protocol;
> > > +        if (protocol_mask == 0 && err == 1) {
> > > +            err = AVERROR(EPROTONOSUPPORT);
> > > +            goto fail;
> > > +        }
> > > +    } while (err);
> >
> > New lines are wrongly indeted.
> 
> 
> That's on purpose. I try to make the "reindent" patch as small as possible
> so I indent the new lines correctly already and only leave the lines that
> this patch does not really touch in the old indent (and then the reindent
> patch, 4/4, fixes those lines).

how can the following end up with correct indention with no reindent?
These are new lines ...

> > > +    do {
> > > +        int protocol = protocol_mask & ~(protocol_mask - 1);
> > > +
> > > +    err = make_setup_request(s, host, port, protocol);
> > > +    if (err < 0)



> 
> If you'd prefer all lines "wrongly indented" and have the reindent patch fix
> that, let me know and I'll submit modified patches.
> 
> 
> > Also i suspect this code will leak various things.
> 
> 
> make_setup_request() doesn't allocate resources, be that memory or FDs. If
> there's something specific that I'm missing, please be more specific. :-).

There are 2 url_open() it does not seem its guranteed for them to be closed
but then i dont know the code ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/20080302/97b49982/attachment.pgp>



More information about the ffmpeg-devel mailing list