From 40648d8cc372c328965a2e2e8e5ef8c88cba3e3f Mon Sep 17 00:00:00 2001 From: rogerdpack Date: Wed, 26 Dec 2012 12:21:15 -0700 Subject: add note on windows pipe Signed-off-by: rogerdpack Signed-off-by: Michael Niedermayer --- ffmpeg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ffmpeg.c') diff --git a/ffmpeg.c b/ffmpeg.c index 977218f62a..acaa523170 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -369,8 +369,10 @@ static int read_key(void) } if (is_pipe) { /* When running under a GUI, you will end here. */ - if (!PeekNamedPipe(input_handle, NULL, 0, NULL, &nchars, NULL)) + if (!PeekNamedPipe(input_handle, NULL, 0, NULL, &nchars, NULL)) { + // input pipe may have been closed by the program that ran ffmpeg return -1; + } //Read it if(nchars != 0) { read(0, &ch, 1); -- cgit v1.2.3