[FFmpeg-devel] [PATCH 1/3] ffmpeg: modify tty state when stderr is redirected
Ganesh Ajjanagadde
gajjanag at mit.edu
Sat Oct 10 16:57:35 CEST 2015
On Sat, Oct 3, 2015 at 4:43 PM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
> ping
Please note that I am pasting the patch here as a reference, it may be
mangled by gmail:
Removes unnecessary isatty(), fixes Ticket2964
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
ffmpeg.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 5575e2f..fe250e5 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -32,14 +32,12 @@
#include <limits.h>
#include <stdint.h>
-#if HAVE_ISATTY
#if HAVE_IO_H
#include <io.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#endif
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
@@ -370,11 +368,7 @@ void term_init(void)
#if HAVE_TERMIOS_H
if(!run_as_daemon){
struct termios tty;
- int istty = 1;
-#if HAVE_ISATTY
- istty = isatty(0) && isatty(2);
-#endif
- if (istty && tcgetattr (0, &tty) == 0) {
+ if (tcgetattr (0, &tty) == 0) {
oldtty = tty;
restore_tty = 1;
Actual patch itself:
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/176481.html
Ping once more.
More information about the ffmpeg-devel
mailing list