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

Ronald S. Bultje rsbultje
Tue Mar 18 13:53:10 CET 2008


Hi,

On Sun, Mar 2, 2008 at 10:07 AM, Ronald S. Bultje <rsbultje at gmail.com>
wrote:

> On Sun, Mar 2, 2008 at 6:31 AM, Michael Niedermayer <michaelni at gmx.at>
> wrote:
>
> > > > > > 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 ...
> > >
> > >
> > > That's closed in rtsp_close_stream(), which is called in open() when
> > > make_setup_request() fails (in the fail: at the bottom).
> >
> > make_setup_request() fail looks like this:
> > fail:
> >    return err;
> > }
>
>
> I meant the function calling make_setup_request(), that's
> rtsp_read_header().
>
>
> > The calling code does not free resources allocated in
> > make_setup_request() it
> > also would be wrong to free it there anyway, it just calls
> > make_setup_request()
> > again overwriting whatever is already opened.
>
>
> OK, I see what you mean now. I'll free resources in make_setup_request()
> itself where relevant.


I added a url_close() to make_setup_request(). New patch attached. I also
fixed the indenting where appropriate (indent-only changes still in a
separate patch).

Ronald
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rtsp-alternate-protocol.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080318/7d8c1212/attachment.asc>



More information about the ffmpeg-devel mailing list