]> git.sesse.net Git - x264/commitdiff
Allow --demuxer forcing with known extensions
authorAnton Mitrofanov <BugMaster@narod.ru>
Tue, 31 Aug 2010 15:45:22 +0000 (08:45 -0700)
committerFiona Glaser <fiona@x264.com>
Fri, 3 Sep 2010 20:34:22 +0000 (13:34 -0700)
x264.c

diff --git a/x264.c b/x264.c
index c1f98c0ffeec21f9635923cbc94db02f46c94f0c..9b09fac0fd5790ed41cf97692ac9d90350d12ebb 100644 (file)
--- a/x264.c
+++ b/x264.c
@@ -933,9 +933,9 @@ static int select_output( const char *muxer, char *filename, x264_param_t *param
 static int select_input( const char *demuxer, char *used_demuxer, char *filename,
                          hnd_t *p_handle, video_info_t *info, cli_input_opt_t *opt )
 {
-    const char *ext = get_filename_extension( filename );
-    int b_regular = strcmp( filename, "-" );
     int b_auto = !strcasecmp( demuxer, "auto" );
+    const char *ext = b_auto ? get_filename_extension( filename ) : "";
+    int b_regular = strcmp( filename, "-" );
     if( !b_regular && b_auto )
         ext = "raw";
     b_regular = b_regular && x264_is_regular_file_path( filename );