]> git.videolan.org Git - x264.git/commitdiff
Actually error out if preset/tune/profile is invalid
authorJason Garrett-Glaser <darkshikari@gmail.com>
Tue, 23 Feb 2010 10:18:07 +0000 (02:18 -0800)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Tue, 23 Feb 2010 10:18:07 +0000 (02:18 -0800)
Got lost somewhere in the move to libx264-based presets.

x264.c

diff --git a/x264.c b/x264.c
index 2875dd16e9b094ed8e161ff7af0441e95ff15451..b2ab17c7362139e0ab2cf83c44efcc69d9bff6d6 100644 (file)
--- a/x264.c
+++ b/x264.c
@@ -827,7 +827,8 @@ static int Parse( int argc, char **argv, x264_param_t *param, cli_opt_t *opt )
             return -1;
     }
 
-    x264_param_default_preset( param, preset, tune );
+    if( x264_param_default_preset( param, preset, tune ) < 0 )
+        return -1;
 
     /* Parse command line options */
     for( optind = 0;; )
@@ -987,7 +988,8 @@ generic_option:
         x264_param_apply_fastfirstpass( param );
 
     /* Apply profile restrictions. */
-    x264_param_apply_profile( param, profile );
+    if( x264_param_apply_profile( param, profile ) < 0 )
+        return -1;
 
     /* Get the file name */
     if( optind > argc - 1 || !output_filename )