[vlc-devel] [PATCH] transform: inline error handling

Alexandre Janniaux ajanni at videolabs.io
Fri Jan 8 11:16:03 UTC 2021


Hi,

On Fri, Jan 08, 2021 at 10:50:57AM +0100, Steve Lhomme wrote:
> On 2021-01-08 10:29, Rémi Denis-Courmont wrote:
> > Le perjantaina 8. tammikuuta 2021, 11.19.38 EET Steve Lhomme a écrit :
> > > On 2021-01-08 10:16, Alexandre Janniaux wrote:
> > > > Hi,
> > > >
> > > > On Fri, Jan 08, 2021 at 07:40:11AM +0100, Steve Lhomme wrote:
> > > > > On 2021-01-07 16:51, Alexandre Janniaux wrote:
> > > > > > ...and remove useless error label. The resources are released by the
> > > > > > vlc_objres mechanism already.
> > > > >
> > > > > Did you check all possible ways to create filters do release resources on
> > > > > Open error ? If so this should be done in other filters as well.
> > > >
> > > > I don't understand, this patch is local to the transform filter.
> > > > I don't change anything outside of it, and have checked that the
> > > > objres release is actually done (which it is, through module_need).
> > >
> > > So you understand that the key for this patch to work is that
> > > module_need calls do the cleaning.
> >
> > And? All this patch does is replace an explicit (objres) free with an implicit
> > objres free. As Alexandre already pointed out, it has no bearing on other
> > modules.
>
> No but my point is that if we assume plugins (all of them?) are already
> cleaned when the activate callback fails, *then* we can do the same patch
> for all other plugins.

I think the confusing came from the way you formulated your
request, which felt like something I had to do to merge this
patch, ie. that I had to modify all other plugins.

> On the other hand if it's not clear, or checked, that plugins are always
> cleaned on activate, then this patch introduces a leak.

It's quite easy to check in the code, thus why I wrote that
it was already released in the commit message. ;)

Regards,
--
Alexandre Janniaux
Videolabs


More information about the vlc-devel mailing list