[vlc-devel] [PATCH 1/4] filters: flush before closing filters

Alexandre Janniaux ajanni at videolabs.io
Tue Oct 13 11:11:52 CEST 2020


Hi,

I agree with RĂ©mi, I'm not sure why the filter should flush
before closing, there's not really reason why all the filters
need this and it seems to be an arbitrary choice to force
that.

Regards,
--
Alexandre Janniaux
Videolabs

On Tue, Oct 13, 2020 at 08:22:36AM +0200, Steve Lhomme wrote:
> ---
>  include/vlc_filter.h | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/include/vlc_filter.h b/include/vlc_filter.h
> index 88df8ae5daa..acc2fac9de8 100644
> --- a/include/vlc_filter.h
> +++ b/include/vlc_filter.h
> @@ -174,12 +174,6 @@ struct filter_t
>      filter_owner_t      owner;
>  };
>
> -static inline void filter_Close( filter_t *p_filter )
> -{
> -    if ( p_filter->ops->close )
> -        p_filter->ops->close( p_filter );
> -}
> -
>  /**
>   * This function will return a new picture usable by p_filter as an output
>   * buffer. You have to release it using picture_Release or by returning
> @@ -215,6 +209,13 @@ static inline void filter_Flush( filter_t *p_filter )
>          p_filter->ops->flush( p_filter );
>  }
>
> +static inline void filter_Close( filter_t *p_filter )
> +{
> +    filter_Flush( p_filter );
> +    if ( p_filter->ops->close )
> +        p_filter->ops->close( p_filter );
> +}
> +
>  static inline void filter_ChangeViewpoint( filter_t *p_filter,
>                                             const vlc_viewpoint_t *vp)
>  {
> --
> 2.26.2
>
> _______________________________________________
> 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