[vlc-devel] commit: Assert against broken values in input_clock_Update. (Laurent Aimar )

git version control git at videolan.org
Thu Apr 30 22:19:23 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Apr 30 22:10:25 2009 +0200| [5491c687697f452bee1b1047042a58b3405c711f] | committer: Laurent Aimar 

Assert against broken values in input_clock_Update.

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

 src/input/clock.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/input/clock.c b/src/input/clock.c
index 2fafa89..dc010e5 100644
--- a/src/input/clock.c
+++ b/src/input/clock.c
@@ -203,10 +203,11 @@ void input_clock_Update( input_clock_t *cl,
 {
     bool b_reset_reference = false;
 
+    assert( i_ck_stream > VLC_TS_INVALID && i_ck_system > VLC_TS_INVALID );
+
     vlc_mutex_lock( &cl->lock );
 
-    if( ( !cl->b_has_reference ) ||
-        ( i_ck_stream <= VLC_TS_INVALID && cl->last.i_stream > VLC_TS_INVALID ) )
+    if( !cl->b_has_reference )
     {
         /* */
         b_reset_reference= true;




More information about the vlc-devel mailing list