[FFmpeg-devel] [PATCH] RTSP alternate protocol 2-3/3
Ronald S. Bultje
Tue Mar 18 13:53:10 CET 2008
On Sun, Mar 2, 2008 at 10:07 AM, Ronald S. Bultje <rsbultje at gmail.com>
> On Sun, Mar 2, 2008 at 6:31 AM, Michael Niedermayer <michaelni at gmx.at>
> > > > > > 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
> > 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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the ffmpeg-devel