]> git.sesse.net Git - vlc/commitdiff
aout: remove aout_DecIsEmpty()
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 21 Mar 2015 20:02:42 +0000 (22:02 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 21 Mar 2015 20:02:42 +0000 (22:02 +0200)
src/audio_output/aout_internal.h
src/audio_output/dec.c

index 9f6a4534fd22d24b4c85ea4494f3e5dcd3c09d44..ec729fbc37ec8224000f2fd0ff668518b2b60be1 100644 (file)
@@ -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)
index 74440728958b99b98bfa0e09b5e0cd51c1455be4..5e5eb99dd069b41d693b06c832aa450edb7b6e20 100644 (file)
@@ -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;
-}