summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-28 13:49:04 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-28 13:49:04 +0000
commit7027f14002a89243af1fac12f75b9a74726df24e (patch)
treeb6e37e1ed0c0e1c7a98b9f3ca7aaaab12e9b9b20 /input/input.c
parent356da44ecd456079b20604ea3bb46ae7db051caa (diff)
downloadmpv-7027f14002a89243af1fac12f75b9a74726df24e.tar.bz2
mpv-7027f14002a89243af1fac12f75b9a74726df24e.tar.xz
Fix when stdin is used as a file
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4893 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/input/input.c b/input/input.c
index 537a897f0f..6b9c84c2a5 100644
--- a/input/input.c
+++ b/input/input.c
@@ -634,6 +634,7 @@ mp_input_read_keys(int time,int paused) {
if((unsigned int)i >= num_key_fd) {
i = -1;
last_loop++;
+ last_loop %= (num_key_fd+1);
continue;
}
// No input from this fd
@@ -785,6 +786,7 @@ mp_input_read_cmds(int time) {
if((unsigned int)i >= num_cmd_fd) {
i = -1;
last_loop++;
+ last_loop %= (num_cmd_fd+1);
continue;
}
if( ! (cmd_fds[i].flags & MP_FD_NO_SELECT) && ! FD_ISSET(cmd_fds[i].fd,&fds) && ! (cmd_fds[i].flags & MP_FD_GOT_CMD) )