[vlc-devel] [RFC PATCH 3/3] audio_output: drain aout filters on flush (if waiting)

Thomas Guillem thomas at gllm.fr
Tue Nov 3 12:40:00 CET 2015


---
 src/audio_output/dec.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 9e356aa..66b5836 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -425,6 +425,14 @@ void aout_DecFlush (audio_output_t *aout, bool wait)
     aout_OutputLock (aout);
     owner->sync.end = VLC_TS_INVALID;
     if (owner->mixer_format.i_format)
+    {
+        if (wait)
+        {
+            block_t *block = aout_FiltersDrain (owner->filters);
+            if (block)
+                aout_OutputPlay (aout, block);
+        }
         aout_OutputFlush (aout, wait);
+    }
     aout_OutputUnlock (aout);
 }
-- 
2.1.4



More information about the vlc-devel mailing list