[FFmpeg-cvslog] add note on windows pipe
rogerdpack
git at videolan.org
Sun Jan 6 17:57:57 CET 2013
ffmpeg | branch: master | rogerdpack <rogerpack2005 at gmail.com> | Wed Dec 26 12:21:15 2012 -0700| [40648d8cc372c328965a2e2e8e5ef8c88cba3e3f] | committer: Michael Niedermayer
add note on windows pipe
Signed-off-by: rogerdpack <rogerpack2005 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40648d8cc372c328965a2e2e8e5ef8c88cba3e3f
---
ffmpeg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 977218f..acaa523 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);
More information about the ffmpeg-cvslog
mailing list