ffmpeg: don't reconfigure terminal if we're not taking input from stdin
This commit is contained in:
parent
711bfb33df
commit
1f7d586052
4
ffmpeg.c
4
ffmpeg.c
@ -366,7 +366,7 @@ static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType)
|
|||||||
void term_init(void)
|
void term_init(void)
|
||||||
{
|
{
|
||||||
#if HAVE_TERMIOS_H
|
#if HAVE_TERMIOS_H
|
||||||
if(!run_as_daemon){
|
if (!run_as_daemon && stdin_interaction) {
|
||||||
struct termios tty;
|
struct termios tty;
|
||||||
if (tcgetattr (0, &tty) == 0) {
|
if (tcgetattr (0, &tty) == 0) {
|
||||||
oldtty = tty;
|
oldtty = tty;
|
||||||
@ -4493,8 +4493,6 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
show_banner(argc, argv, options);
|
show_banner(argc, argv, options);
|
||||||
|
|
||||||
term_init();
|
|
||||||
|
|
||||||
/* parse options and open all input/output files */
|
/* parse options and open all input/output files */
|
||||||
ret = ffmpeg_parse_options(argc, argv);
|
ret = ffmpeg_parse_options(argc, argv);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@ -3160,6 +3160,9 @@ int ffmpeg_parse_options(int argc, char **argv)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* configure terminal and setup signal handlers */
|
||||||
|
term_init();
|
||||||
|
|
||||||
/* open input files */
|
/* open input files */
|
||||||
ret = open_files(&octx.groups[GROUP_INFILE], "input", open_input_file);
|
ret = open_files(&octx.groups[GROUP_INFILE], "input", open_input_file);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user