From f5af5962378bd40a409716434a6a4d312e50c755 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 7 Sep 2014 20:44:54 +0200 Subject: player: some more input refactoring Continues commit 348dfd93. Replace other places where input was manually fetched with common code. demux_was_interrupted() was a weird function; I'm not entirely sure about its original purpose, but now we can just replace it with simpler code as well. One difference is that we always look at the command queue, rather than just when cache initialization failed. Also, instead of discarding all but quit/playlist commands (aka abort command), run all commands. This could possibly lead to unwanted side-effects, like just ignoring commands that have no effect (consider pressing 'f' for fullscreen right on start: since the window is not created yet, it would get discarded). But playlist navigation still works as intended, and some if not all these problems already existed before that in some forms, so it should be ok. --- player/misc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'player/misc.c') diff --git a/player/misc.c b/player/misc.c index bc3a1980c9..51f3e0f863 100644 --- a/player/misc.c +++ b/player/misc.c @@ -188,13 +188,7 @@ void stream_dump(struct MPContext *mpctx) (long long int)pos, (long long int)size); } stream_fill_buffer(stream); - for (;;) { - mp_cmd_t *cmd = mp_input_get_cmd(mpctx->input, 0, false); - if (!cmd) - break; - run_command(mpctx, cmd); - talloc_free(cmd); - } + mp_process_input(mpctx); } } -- cgit v1.2.3