summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-10-11 13:55:00 -0500
committerDudemanguy <random342@airmail.cc>2023-10-16 15:38:59 +0000
commit635674a4a0844191f7f2142dd3d07b3edffca9d5 (patch)
tree183658f66eccce45dcc623ef311ee5f2621b05d6
parent50025428b17e82c9689dab82fcd0486648c4a9fd (diff)
downloadmpv-635674a4a0844191f7f2142dd3d07b3edffca9d5.tar.bz2
mpv-635674a4a0844191f7f2142dd3d07b3edffca9d5.tar.xz
filters: change end time calculation to nanoseconds
-rw-r--r--filters/filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/filters/filter.c b/filters/filter.c
index 80ec6ddff3..0fd79b83e2 100644
--- a/filters/filter.c
+++ b/filters/filter.c
@@ -214,7 +214,7 @@ bool mp_filter_graph_run(struct mp_filter *filter)
int64_t end_time = 0;
if (isfinite(r->max_run_time))
- end_time = mp_time_us_add(mp_time_us(), MPMAX(r->max_run_time, 0));
+ end_time = mp_time_ns_add(mp_time_ns(), MPMAX(r->max_run_time, 0));
// (could happen with separate filter graphs calling each other, for now
// ignore this issue as we don't use such a setup anywhere)
@@ -261,7 +261,7 @@ bool mp_filter_graph_run(struct mp_filter *filter)
if (next->in->info->process)
next->in->info->process(next);
- if (end_time && mp_time_us() >= end_time)
+ if (end_time && mp_time_ns() >= end_time)
mp_filter_graph_interrupt(r->root_filter);
}