[vlc-commits] opensles: TimeGet returns -1 when we have no data on latency

Rafaël Carré git at videolan.org
Sun Dec 16 11:12:55 CET 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Dec 16 10:19:02 2012 +0100| [d56cfd2d9119ee1e8ed0fe57406aed3db70da3d0] | committer: Rafaël Carré

opensles: TimeGet returns -1 when we have no data on latency

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d56cfd2d9119ee1e8ed0fe57406aed3db70da3d0
---

 modules/audio_output/opensles_android.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/audio_output/opensles_android.c b/modules/audio_output/opensles_android.c
index 3b32f7c..8d1930a 100644
--- a/modules/audio_output/opensles_android.c
+++ b/modules/audio_output/opensles_android.c
@@ -174,7 +174,10 @@ static int TimeGet(audio_output_t* p_aout, mtime_t* restrict drift)
         return -1;
     }
 
-    *drift = (delay && st.count) ? delay : 0;
+    if (delay == 0 || st.count == 0)
+        return -1;
+
+    *drift = delay;
     return 0;
 }
 



More information about the vlc-commits mailing list