]> git.sesse.net Git - vlc/commitdiff
fixed comparision between incompatible values preventing detection of PCR gaps
authorMarian Durkovic <md@videolan.org>
Sun, 13 Nov 2005 11:53:47 +0000 (11:53 +0000)
committerMarian Durkovic <md@videolan.org>
Sun, 13 Nov 2005 11:53:47 +0000 (11:53 +0000)
src/input/clock.c

index 3e5fd1bd968b0d0c221886fcce8de5b0a6686b0d..017a1810799199ac1723ef74f0b8e6a369e4d65a 100644 (file)
@@ -272,9 +272,10 @@ void input_ClockSetPCR( input_thread_t *p_input,
     }
     else
     {
+        mtime_t clock_max_gap = CR_MAX_GAP * 90 / p_input->i_rate;
         if ( cl->last_cr != 0 &&
-               (    (cl->last_cr - i_clock) > CR_MAX_GAP
-                 || (cl->last_cr - i_clock) < - CR_MAX_GAP ) )
+               (    (cl->last_cr - i_clock) > clock_max_gap
+                 || (cl->last_cr - i_clock) < - clock_max_gap ) )
         {
             /* Stream discontinuity, for which we haven't received a
              * warning from the stream control facilities (dd-edited