1
mirror of https://github.com/mpv-player/mpv synced 2024-08-04 14:59:58 +02:00

input: fix --input-ar-rate=0

Crashed, instead of disabling auto-repeat.
This commit is contained in:
wm4 2013-10-20 13:55:10 +02:00
parent 6a4e59677e
commit afa9e50587

View File

@ -1783,7 +1783,7 @@ static void input_wait_read(struct input_ctx *ictx, int time)
*/
static void read_events(struct input_ctx *ictx, int time)
{
if (ictx->num_key_down) {
if (ictx->num_key_down && ictx->ar_rate > 0) {
time = FFMIN(time, 1000 / ictx->ar_rate);
time = FFMIN(time, ictx->ar_delay);
}