From 3331492a173cc32d6de772dacbbd0c242e9195f9 Mon Sep 17 00:00:00 2001 From: gayot_o Date: Tue, 19 Nov 2013 17:35:09 +0000 Subject: 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. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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])); -- cgit v1.2.3