[vlc-commits] mmdevice: max out drain delay in case of buggy output
Thomas Guillem
git at videolan.org
Sat Sep 2 17:49:55 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Sep 2 17:48:09 2017 +0200| [7197302c5f3b4992759817fc53c7119310ce7e93] | committer: Thomas Guillem
mmdevice: max out drain delay in case of buggy output
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7197302c5f3b4992759817fc53c7119310ce7e93
---
modules/audio_output/mmdevice.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/audio_output/mmdevice.h b/modules/audio_output/mmdevice.h
index 51f5e427df..3c7b6d35ba 100644
--- a/modules/audio_output/mmdevice.h
+++ b/modules/audio_output/mmdevice.h
@@ -78,7 +78,8 @@ 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)))
+ if (SUCCEEDED(aout_stream_TimeGet(s, &delay))
+ && delay <= INT64_C(5000000))
Sleep((delay / (CLOCK_FREQ / 1000)) + 1);
return S_OK;
}
More information about the vlc-commits
mailing list