[vlc-devel] [PATCH 1/2] mmdevice: more accurate drain emulation
Thomas Guillem
thomas at gllm.fr
Sat Sep 2 15:40:33 CEST 2017
---
modules/audio_output/mmdevice.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/audio_output/mmdevice.h b/modules/audio_output/mmdevice.h
index 51f5e427df..6843bc95ec 100644
--- a/modules/audio_output/mmdevice.h
+++ b/modules/audio_output/mmdevice.h
@@ -78,7 +78,7 @@ static inline HRESULT aout_stream_Flush(aout_stream_t *s, bool wait)
{ /* Loosy drain emulation */
mtime_t delay;
- if (SUCCEEDED(aout_stream_TimeGet(s, &delay)))
+ while (SUCCEEDED(aout_stream_TimeGet(s, &delay)) && delay > 0)
Sleep((delay / (CLOCK_FREQ / 1000)) + 1);
return S_OK;
}
--
2.11.0
More information about the vlc-devel
mailing list