void term_init(void)
{
#if HAVE_TERMIOS_H
- if(!run_as_daemon){
+ if (!run_as_daemon && stdin_interaction) {
struct termios tty;
if (tcgetattr (0, &tty) == 0) {
oldtty = tty;
show_banner(argc, argv, options);
- term_init();
-
/* parse options and open all input/output files */
ret = ffmpeg_parse_options(argc, argv);
if (ret < 0)
goto fail;
}
+ /* configure terminal and setup signal handlers */
+ term_init();
+
/* open input files */
ret = open_files(&octx.groups[GROUP_INFILE], "input", open_input_file);
if (ret < 0) {