Revision bc3057f4

View differences:

libavformat/timefilter.c
59 59
    self->count++;
60 60
    if (self->count==1) {
61 61
        /// init loop
62
        self->cycle_time        = system_time;
62
        self->cycle_time    = system_time;
63 63
    } else {
64 64
        double loop_error;
65 65
        self->cycle_time   += self->clock_period * period;
66 66
        /// calculate loop error
67
        loop_error = system_time - self->cycle_time;
67
        loop_error          = system_time - self->cycle_time;
68 68

  
69 69
        /// update loop
70
        self->cycle_time        += FFMAX(self->feedback2_factor, 1.0/(self->count)) * loop_error;
70
        self->cycle_time   += FFMAX(self->feedback2_factor, 1.0/(self->count)) * loop_error;
71 71
        self->clock_period += self->feedback3_factor * loop_error / period;
72 72
    }
73 73
    return self->cycle_time;

Also available in: Unified diff