[vlc-commits] audiotrack: negative delay can finally happen

Thomas Guillem git at videolan.org
Wed Apr 29 14:11:11 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Apr 29 14:06:41 2015 +0200| [57a878e66714c3752077a554923d86e380efd101] | committer: Thomas Guillem

audiotrack: negative delay can finally happen

It happens in case of underflow: if there is too much delay between two
consecutives call of Play or TimeGet.

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

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

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 12fc84a..c4e5b14 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -690,7 +690,10 @@ TimeGet( audio_output_t *p_aout, mtime_t *restrict p_delay )
             return 0;
         }
         else
-            msg_Warn( p_aout, "Negative delay, Should not happen !" );
+        {
+            msg_Warn( p_aout, "timing screwed, reset positions" );
+            AudioTrack_ResetPositions( env, p_aout );
+        }
     }
     return -1;
 }



More information about the vlc-commits mailing list