[vlc-devel] [PATCH 1/2] input: don't keep the sout reference when it's released

Steve Lhomme robux4 at gmail.com
Tue Apr 5 08:39:00 CEST 2016


On Sat, Apr 2, 2016 at 11:25 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> On Friday 01 April 2016 11:05:19 Steve Lhomme wrote:
>> these lines tell the resources not to provide the SOUT anymore
>
> Actually not. Only the first one does that - and then p_sout should already be
> NULL.

In the case of the line preceeded by if ( p_input->p->p_sout ) it's
definitely only called when it's not NULL, thus pushing into the
resources internal for possible reuse. It should not be kept in
p_input->p->p_sout after that point.

So in general I think it's better to make sure p_input->p->p_sout is
reset to NULL every time it's passed to input_resource_RequestSout()
with a NULL string. It would also improve the readability of the code.

>> so the input
>> shouldn't use it either
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list