[vlc-devel] [RFC PATCH 2/8] demux: Add a demux_IsDemuxFilter helper

Rémi Denis-Courmont remi at remlab.net
Thu Jul 6 19:45:25 CEST 2017


Le torstaina 6. heinäkuuta 2017, 19.14.25 EEST Hugo Beauzée-Luyssen a écrit :
> ---
>  src/input/demux.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/input/demux.h b/src/input/demux.h
> index 25c9520de2..24d5ad58bd 100644
> --- a/src/input/demux.h
> +++ b/src/input/demux.h
> @@ -42,4 +42,10 @@ int demux_GetSeekpoint( demux_t * );
> 
>  demux_t *demux_FilterChainNew( demux_t *p_demux, const char *psz_name );
> 
> +static inline bool demux_IsDemuxFilter( const demux_t* p_demux )
> +{
> +    return p_demux->psz_access == NULL && p_demux->psz_demux == NULL &&
> +            p_demux->psz_file == NULL && p_demux->psz_location == NULL;
> +}
> +
>  #endif

Nack. The input has no business checking if the underlying object is a filter 
or not. (And the difference won´t even make sense once stream and demux are 
unified.)

I´ve spent a lof of time fixing that exact sort of bugs in the input thread. 
No thanks.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list