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

Ronald S. Bultje rsbultje
Sun Mar 2 15:07:17 CET 2008


Hi Michael,

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.

Ronald




More information about the ffmpeg-devel mailing list