[vlc-devel] [PATCH] input: Delete the demux_filter chain upon input deletion

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Jun 23 10:53:21 CEST 2017


On Thu, Jun 22, 2017, at 06:10 PM, Rémi Denis-Courmont wrote:
> On jeudi 22 juin 2017 17:37:44 EEST Hugo Beauzée-Luyssen wrote:
> > This allows a demux_filter to be removed from the chain without
> > removing the entire chain at once.
> 
> TBH, I don't see the point. After the filter is removed, the input thread
> knows 
> nothing of the original demux anymore (just like it knows nothing of the 
> stream filters and access). So the only sane thing to do is to delete it
> and 
> any intermediate filters.
> 

As far as I understand that's not an issue, when we insert a
demux_filter we prepend it to the chain, so removing it shouldn't impact
the remaining demux/stream_filter/access

It's also possible to destroy the chain entirely, and call
InputSourceNew again to recreate the entire chain, but it feels
needlessly heavy, and seems problematic for non-seekable input for
instance.

> Also the capability check is very ugly.
> 

True, the other way to do the same I can see would be to check if
psz_access/demux/location/file are all set to NULL, but I find this less
explicit at best (and is it a valid assumption?). We could add a small
helper though.

> -- 
> Rémi
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list