diff timefilter.c @ 4653:34a843f958b7 libavformat

Merge ff_timefilter_read() and ff_timefilter_update(), this simplifies API and avoids calling them in the wrong order.
author michael
date Fri, 06 Mar 2009 00:14:44 +0000
parents 28b80bbf6288
children d90df812a2a1
line wrap: on
line diff
--- a/timefilter.c	Fri Mar 06 00:09:14 2009 +0000
+++ b/timefilter.c	Fri Mar 06 00:14:44 2009 +0000
@@ -53,7 +53,7 @@
     self->cycle_time = 0;
 }
 
-void ff_timefilter_update(TimeFilter *self, double system_time, double period)
+double ff_timefilter_update(TimeFilter *self, double system_time, double period)
 {
     if (!self->cycle_time) {
         /// init loop
@@ -68,9 +68,5 @@
         self->cycle_time        += self->feedback2_factor * loop_error;
         self->integrator2_state += self->feedback3_factor * loop_error / period;
     }
-}
-
-double ff_timefilter_read(TimeFilter *self)
-{
     return self->cycle_time;
 }