Commit f2b07971 authored by Fiona Glaser's avatar Fiona Glaser

Fix restoring of console title on Windows with ffms indexing

parent 86f8a74a
......@@ -74,6 +74,8 @@ static void sigint_handler( int a )
b_ctrl_c = 1;
}
static char UNUSED originalCTitle[200] = "";
typedef struct {
int b_progress;
int i_seek;
......@@ -262,6 +264,8 @@ int main( int argc, char **argv )
_setmode(_fileno(stdout), _O_BINARY);
#endif
GetConsoleTitle( originalCTitle, sizeof(originalCTitle) );
/* Parse command line */
if( parse( argc, argv, &param, &opt ) < 0 )
ret = -1;
......@@ -284,6 +288,8 @@ int main( int argc, char **argv )
if( opt.qpfile )
fclose( opt.qpfile );
SetConsoleTitle( originalCTitle );
return ret;
}
......@@ -1644,9 +1650,6 @@ static int encode( x264_param_t *param, cli_opt_t *opt )
double duration;
double pulldown_pts = 0;
int retval = 0;
char UNUSED originalCTitle[200] = "";
GetConsoleTitle( originalCTitle, sizeof(originalCTitle) );
opt->b_progress &= param->i_log_level < X264_LOG_DEBUG;
......@@ -1805,7 +1808,5 @@ fail:
(double) i_file * 8 / ( 1000 * duration ) );
}
SetConsoleTitle( originalCTitle );
return retval;
}
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