diff timefilter.c @ 4655:d9f082019a79 libavformat

Fix bug with time==0 being special.
author michael
date Fri, 06 Mar 2009 00:23:52 +0000
parents d90df812a2a1
children c467710f2fe2
line wrap: on
line diff
--- a/timefilter.c	Fri Mar 06 00:20:55 2009 +0000
+++ b/timefilter.c	Fri Mar 06 00:23:52 2009 +0000
@@ -51,14 +51,13 @@
 
 void ff_timefilter_reset(TimeFilter *self)
 {
-    self->cycle_time = 0;
     self->count      = 0;
 }
 
 double ff_timefilter_update(TimeFilter *self, double system_time, double period)
 {
     self->count++;
-    if (!self->cycle_time) {
+    if (self->count==1) {
         /// init loop
         self->cycle_time        = system_time;
     } else {