[vlc-devel] [PATCH] directsound: make StreamTimeGet() return logic similar to OutputTimeGet()

Steve Lhomme robUx4 at videolabs.io
Thu Mar 19 12:27:55 CET 2015


Fixes #14186

StreamTimeGet is a audio_output.time_get callback, so it returns an int
"0 on success, non-zero on failure or lack of data"

--
replaces previous patch with the same name
---
 modules/audio_output/directsound.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c
index 2a1a06d..97929c8 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -176,9 +176,9 @@ static HRESULT TimeGet( aout_stream_sys_t *sys, mtime_t *delay )
     return DS_OK;
 }
 
-static HRESULT StreamTimeGet( aout_stream_t *s, mtime_t *delay )
+static int StreamTimeGet( aout_stream_t *s, mtime_t *delay )
 {
-    return TimeGet( s->sys, delay );
+    return (TimeGet( s->sys, delay ) == DS_OK) ? 0 : -1;
 }
 
 static int OutputTimeGet( audio_output_t *aout, mtime_t *delay )
-- 
2.3.2




More information about the vlc-devel mailing list