]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg.c
Fix compilation with libutvideo version 12.0.0
[ffmpeg] / ffmpeg.c
index 977218f62aeb36fc1a312208580921001c63beab..acaa523170fb475e00a6069cb3c52b5335975ead 100644 (file)
--- 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);