summaryrefslogtreecommitdiffstats
path: root/input/ipc-unix.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2016-07-29 02:24:52 +0100
committerwm4 <wm4@nowhere>2016-07-30 00:02:39 +0200
commitc3e11f7b7c9aec22f7ecc56feacf42194e7ea727 (patch)
treec15fd7c3a37794796921d8bfbf709fe00c95901a /input/ipc-unix.c
parentf3f4e048d8c08d4d578c85dbb32cc80314814d6f (diff)
downloadmpv-c3e11f7b7c9aec22f7ecc56feacf42194e7ea727.tar.bz2
mpv-c3e11f7b7c9aec22f7ecc56feacf42194e7ea727.tar.xz
osdep/io: introduce mp_flush_wakeup_pipe()
Makes a fairly common occurence with wakeup_pipes easier to handle.
Diffstat (limited to 'input/ipc-unix.c')
-rw-r--r--input/ipc-unix.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/input/ipc-unix.c b/input/ipc-unix.c
index 12d7018c9e..0f4b7132e4 100644
--- a/input/ipc-unix.c
+++ b/input/ipc-unix.c
@@ -133,8 +133,7 @@ static void *client_thread(void *p)
}
if (fds[0].revents & POLLIN) {
- char discard[100];
- (void)read(pipe_fd, discard, sizeof(discard));
+ mp_flush_wakeup_pipe(pipe_fd);
while (1) {
mpv_event *event = mpv_wait_event(arg->client, 0);