summaryrefslogtreecommitdiff
path: root/libavformat/timefilter.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-03-06 00:23:52 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-03-06 00:23:52 +0000
commit8537591abcf19b802f10e4a76a1f76a4133e4f5a (patch)
tree7bb2ece957d4432e373a0b744c83a19d820e9c6c /libavformat/timefilter.c
parent494065ca36c75e4c6d8eb1340770f5eff4ebafaf (diff)
Fix bug with time==0 being special.
Originally committed as revision 17843 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/timefilter.c')
-rw-r--r--libavformat/timefilter.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/timefilter.c b/libavformat/timefilter.c
index 7109a0a27f..56d2605fcf 100644
--- a/libavformat/timefilter.c
+++ b/libavformat/timefilter.c
@@ -51,14 +51,13 @@ void ff_timefilter_destroy(TimeFilter *self)
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 {