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 7078df4f5e
commit 97c93918fe
1 changed files with 1 additions and 1 deletions

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