[vlc-devel] [RFC PATCH 5/9] aout: time_get is not mandatory anymore

Thomas Guillem thomas at gllm.fr
Thu Dec 10 18:10:11 CET 2020


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);
 }
 
 /** @} */
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);
-- 
2.29.2



More information about the vlc-devel mailing list