[vlc-commits] aout: assert that callbacks are valid
Thomas Guillem
git at videolan.org
Tue Mar 19 16:03:18 CET 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 14 17:52:50 2019 +0100| [7d6fe91b573dffd9a46179c5c80ff93d07ceaad4] | committer: Thomas Guillem
aout: assert that callbacks are valid
Like said in the documentation.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7d6fe91b573dffd9a46179c5c80ff93d07ceaad4
---
include/vlc_aout.h | 2 +-
src/audio_output/output.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index fb0edd6de6..579119f654 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -461,7 +461,7 @@ static inline int aout_TimeGetDefault(audio_output_t *aout,
static inline void aout_PauseDefault(audio_output_t *aout, bool paused,
vlc_tick_t date)
{
- if (paused && aout->flush != NULL)
+ if (paused)
aout->flush(aout);
(void) date;
}
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index e7ea4788b0..25cb29ae8e 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -269,6 +269,7 @@ audio_output_t *aout_New (vlc_object_t *parent)
vlc_object_delete(aout);
return NULL;
}
+ assert(aout->start && aout->stop);
/*
* Persistent audio output variables
@@ -585,6 +586,7 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt,
aout_OutputLock(aout);
int ret = aout->start(aout, fmt);
+ assert(aout->flush && aout->play && aout->time_get && aout->pause);
aout_OutputUnlock(aout);
if (ret)
{
More information about the vlc-commits
mailing list