From 635674a4a0844191f7f2142dd3d07b3edffca9d5 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Wed, 11 Oct 2023 13:55:00 -0500 Subject: filters: change end time calculation to nanoseconds --- filters/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'filters/filter.c') 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); } -- cgit v1.2.3