Commit 3ae98497 authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde Committed by Ronald S. Bultje

ffmpeg: modify tty state when stderr is redirected

Removes unnecessary isatty(), fixes Ticket2964
Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent 323d3752
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment