diff options
author | wm4 <wm4@nowhere> | 2014-10-19 21:43:08 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-19 22:34:37 +0200 |
commit | d089772b69807b0a66e56f6501d2ecf3d70e0114 (patch) | |
tree | 1b39dccacf3e961e5c3ed576f3d5ef2165380ab9 /input/ipc.c | |
parent | cf627fd3de180f0cb0173e016f160de8399cd692 (diff) | |
download | mpv-d089772b69807b0a66e56f6501d2ecf3d70e0114.tar.bz2 mpv-d089772b69807b0a66e56f6501d2ecf3d70e0114.tar.xz |
ipc: skip empty and commented lines
Diffstat (limited to 'input/ipc.c')
-rw-r--r-- | input/ipc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/input/ipc.c b/input/ipc.c index 64c4bac87b..a64be27de3 100644 --- a/input/ipc.c +++ b/input/ipc.c @@ -557,8 +557,10 @@ static void *client_thread(void *p) json_skip_whitespace(&line0); - char *reply_msg; - if (line0[0] == '{') { + char *reply_msg = NULL; + if (line0[0] == '\0' || line0[0] == '#') { + // skip + } else if (line0[0] == '{') { reply_msg = json_execute_command(arg, tmp, line0); } else { reply_msg = text_execute_command(arg, tmp, line0); |