summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorgayot_o <gayot_o@localhost>2013-11-19 17:35:09 +0000
committergayot_o <gayot_o@localhost>2013-11-19 17:35:09 +0000
commit3331492a173cc32d6de772dacbbd0c242e9195f9 (patch)
tree28e84394a078c81b805226a3540e369b2763ec13 /main.c
parent459e2685158f1dc5a9cd3da1c3125889bc02f9d6 (diff)
mplayer_server: change the buffering type
The stream connected with the mplayer subprocess used to be unbuffered. Since we do not need to write every character one by one, we can set it to line buffered.
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index bb74011..5946a8c 100644
--- a/main.c
+++ b/main.c
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
return -1;
}
- setvbuf(stream_g, NULL, _IONBF, 0);
+ setvbuf(stream_g, NULL, _IOLBF, BUFSIZ);
int sock = bind_socket((argc < 2) ? 4333 : atoi(argv[1]));