[vlc-devel] [PATCH 1/2] aout: wrap time_get in an helper function

Rémi Denis-Courmont remi at remlab.net
Thu Jul 23 15:33:21 CEST 2020


Le torstaina 23. heinäkuuta 2020, 10.57.07 EEST Alexandre Janniaux a écrit :
> Gather all use-case of time_get through a single function, allowing to
> add debugging information in an easier way.
> ---
>  include/vlc_aout.h     | 6 ++++++
>  src/audio_output/dec.c | 6 +++---
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/include/vlc_aout.h b/include/vlc_aout.h
> index 49527f30fb..d92caeb07c 100644
> --- a/include/vlc_aout.h
> +++ b/include/vlc_aout.h
> @@ -530,6 +530,12 @@ VLC_API void    
> aout_FiltersChangeViewpoint(aout_filters_t *, const vlc_viewpoi
> 
>  VLC_API vout_thread_t *aout_filter_GetVout(filter_t *, const video_format_t
> *);
> 
> +static inline int aout_TimeGet(audio_output_t *aout, vlc_tick_t *delay)
> +{
> +    int ret = aout->time_get(aout, delay);
> +    return ret;

No need for intermediate variable here.

> +}
> +
>  /** @} */
> 
>  #endif /* VLC_AOUT_H */


-- 
Rémi Denis-Courmont
http://www.remlab.net/





More information about the vlc-devel mailing list