summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-31 11:24:20 +0100
committerwm4 <wm4@nowhere>2019-10-31 11:24:20 +0100
commit6d92e5550203b04b7254eb8ffe31734e57070d79 (patch)
treefcd9f88cddae110a8a65f9e7ea59703bd79f83c5 /input/input.c
parent6fdfa7c9912ff9fda0ada6125bc4fed61b7220ea (diff)
downloadmpv-6d92e5550203b04b7254eb8ffe31734e57070d79.tar.bz2
mpv-6d92e5550203b04b7254eb8ffe31734e57070d79.tar.xz
Replace uses of FFMIN/MAX with MPMIN/MAX
And remove libavutil includes where possible.
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/input/input.c b/input/input.c
index 4dced9c78d..2b8a18a1a3 100644
--- a/input/input.c
+++ b/input/input.c
@@ -31,9 +31,6 @@
#include <pthread.h>
#include <assert.h>
-#include <libavutil/avstring.h>
-#include <libavutil/common.h>
-
#include "osdep/io.h"
#include "misc/rendezvous.h"
@@ -623,7 +620,7 @@ static void interpret_key(struct input_ctx *ictx, int code, double scale,
cmd->scale = 1;
cmd->scale_units = 1;
// Avoid spamming the player with too many commands
- scale_units = FFMIN(scale_units, 20);
+ scale_units = MPMIN(scale_units, 20);
for (int i = 0; i < scale_units - 1; i++)
mp_input_queue_cmd(ictx, mp_cmd_clone(cmd));
if (scale_units)
@@ -877,8 +874,8 @@ static void adjust_max_wait_time(struct input_ctx *ictx, double *time)
{
struct input_opts *opts = ictx->opts;
if (ictx->last_key_down && opts->ar_rate > 0 && ictx->ar_state >= 0) {
- *time = FFMIN(*time, 1.0 / opts->ar_rate);
- *time = FFMIN(*time, opts->ar_delay / 1000.0);
+ *time = MPMIN(*time, 1.0 / opts->ar_rate);
+ *time = MPMIN(*time, opts->ar_delay / 1000.0);
}
}