Mercurial > mplayer.hg
diff input/input.c @ 25623:b955a135e3a8
Do not use exit_player in the signal handler, this code just can not
be called from a signal handler.
Instead only make the input system generate quit commands for the first
CTRL+C and otherwise do getch2_disable and exit.
| author | reimar |
|---|---|
| date | Tue, 08 Jan 2008 21:40:44 +0000 |
| parents | 54512595b406 |
| children | f689811209b1 |
line wrap: on
line diff
--- a/input/input.c Tue Jan 08 12:46:20 2008 +0000 +++ b/input/input.c Tue Jan 08 21:40:44 2008 +0000 @@ -541,6 +541,8 @@ // Callback to allow the menu filter to grab the incoming keys int (*mp_input_key_cb)(int code) = NULL; +int async_quit_request; + static mp_input_fd_t key_fds[MP_MAX_KEY_FD]; static unsigned int num_key_fd = 0; static mp_input_fd_t cmd_fds[MP_MAX_CMD_FD]; @@ -1312,6 +1314,8 @@ mp_cmd_filter_t* cf; int from_queue; + if (async_quit_request) + return mp_input_parse_cmd("quit 1"); while(1) { from_queue = 1; ret = mp_input_get_queued_cmd(peek_only);
