filters: change end time calculation to nanoseconds

This commit is contained in:
Dudemanguy 2023-10-11 13:55:00 -05:00
parent 50025428b1
commit 635674a4a0
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}