[vlc-devel] [RFC PATCH 5/9] aout: time_get is not mandatory anymore
Rémi Denis-Courmont
remi at remlab.net
Thu Dec 10 19:47:27 CET 2020
Le jeudi 10 décembre 2020, 19:10:11 EET Thomas Guillem a écrit :
> Aout modules are recommended to use aout_RequestRetiming() instead.
> ---
> include/vlc_aout.h | 2 +-
> src/audio_output/output.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/vlc_aout.h b/include/vlc_aout.h
> index 8311b887de..2863927410 100644
> --- a/include/vlc_aout.h
> +++ b/include/vlc_aout.h
> @@ -540,7 +540,7 @@ 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)
> {
> - return aout->time_get(aout, delay);
> + return aout->time_get == NULL ? -1 : aout->time_get(aout, delay);
> }
It seems that the owner cannot treat time_get == NULL the same as
time_get() == -1, so it's odd to allow it here.
>
> /** @} */
> diff --git a/src/audio_output/output.c b/src/audio_output/output.c
> index 098c00b317..487bbdf57e 100644
> --- a/src/audio_output/output.c
> +++ b/src/audio_output/output.c
> @@ -616,7 +616,7 @@ int aout_OutputNew (audio_output_t *aout)
> "failing back to linear format");
> return -1;
> }
> - assert(aout->flush && aout->play && aout->time_get && aout->pause);
> + assert(aout->flush && aout->play && aout->pause);
>
> aout_PrepareStereoMode (aout, fmt, filters_cfg, input_chan_type,
> i_nb_input_channels);
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list