From: RĂ©mi Denis-Courmont Date: Sat, 21 Mar 2015 20:02:42 +0000 (+0200) Subject: aout: remove aout_DecIsEmpty() X-Git-Url: https://git.sesse.net/?p=vlc;a=commitdiff_plain;h=a308b7a17466bb91908a518c93b36dacb49212e7 aout: remove aout_DecIsEmpty() --- diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h index 9f6a4534fd..ec729fbc37 100644 --- a/src/audio_output/aout_internal.h +++ b/src/audio_output/aout_internal.h @@ -140,7 +140,6 @@ int aout_DecPlay(audio_output_t *, block_t *, int i_input_rate); int aout_DecGetResetLost(audio_output_t *); void aout_DecChangePause(audio_output_t *, bool b_paused, mtime_t i_date); void aout_DecFlush(audio_output_t *, bool wait); -bool aout_DecIsEmpty(audio_output_t *); void aout_RequestRestart (audio_output_t *, unsigned); static inline void aout_InputRequestRestart(audio_output_t *aout) diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c index 7444072895..5e5eb99dd0 100644 --- a/src/audio_output/dec.c +++ b/src/audio_output/dec.c @@ -421,21 +421,3 @@ void aout_DecFlush (audio_output_t *aout, bool wait) aout_OutputFlush (aout, wait); aout_OutputUnlock (aout); } - -bool aout_DecIsEmpty (audio_output_t *aout) -{ - aout_owner_t *owner = aout_owner (aout); - mtime_t now = mdate (); - bool empty = true; - - aout_OutputLock (aout); - if (owner->sync.end != VLC_TS_INVALID) - empty = owner->sync.end <= now; - if (empty && owner->mixer_format.i_format) - /* The last PTS has elapsed already. So the underlying audio output - * buffer should be empty or almost. Thus draining should be fast - * and will not block the caller too long. */ - aout_OutputFlush (aout, true); - aout_OutputUnlock (aout); - return empty; -}