]> git.sesse.net Git - x264/commitdiff
Disable progress for FFMS input with --no-progress
authorAnton Mitrofanov <BugMaster@narod.ru>
Tue, 5 Apr 2011 10:06:54 +0000 (14:06 +0400)
committerFiona Glaser <fiona@x264.com>
Tue, 12 Apr 2011 08:37:31 +0000 (01:37 -0700)
input/ffms.c
input/input.h
x264.c

index 8e76e5a142b65ea3e164998dd3f61ef33e730e45..ebfdb68690828be7701be2d2e0b42843581adc54 100644 (file)
@@ -85,8 +85,13 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
     }
     if( !idx )
     {
-        idx = FFMS_MakeIndex( psz_filename, 0, 0, NULL, NULL, 0, update_progress, &h->time, &e );
-        fprintf( stderr, "                                            \r" );
+        if( opt->progress )
+        {
+            idx = FFMS_MakeIndex( psz_filename, 0, 0, NULL, NULL, 0, update_progress, &h->time, &e );
+            fprintf( stderr, "                                            \r" );
+        }
+        else
+            idx = FFMS_MakeIndex( psz_filename, 0, 0, NULL, NULL, 0, NULL, NULL, &e );
         FAIL_IF_ERROR( !idx, "could not create index\n" )
         if( opt->index_file && FFMS_WriteIndex( opt->index_file, idx, &e ) )
             x264_cli_log( "ffms", X264_LOG_WARNING, "could not write index file\n" );
index c8008a6a1f94d4e0cda44a98710f05b18d268cf8..1a94e0cc52362821c25a4b49b4c360ae6922bf3b 100644 (file)
@@ -40,6 +40,7 @@ typedef struct
     int bit_depth;
     char *timebase;
     int seek;
+    int progress;
 } cli_input_opt_t;
 
 /* properties of the source given by the demuxer */
diff --git a/x264.c b/x264.c
index 32eaa0e286662a340070634f68b98817dada4879..35695c2920fb0a8b867c718b43cf6e0c9be46668 100644 (file)
--- a/x264.c
+++ b/x264.c
@@ -269,6 +269,9 @@ int main( int argc, char **argv )
     if( parse( argc, argv, &param, &opt ) < 0 )
         ret = -1;
 
+    /* Restore title; it can be changed by input modules */
+    SetConsoleTitle( originalCTitle );
+
     /* Control-C handler */
     signal( SIGINT, sigint_handler );
 
@@ -1398,6 +1401,8 @@ generic_option:
     info.tff        = param->b_tff;
     info.vfr        = param->b_vfr_input;
 
+    input_opt.progress = opt->b_progress;
+
     if( select_input( demuxer, demuxername, input_filename, &opt->hin, &info, &input_opt ) )
         return -1;