From: Jason Garrett-Glaser Date: Tue, 23 Feb 2010 10:18:07 +0000 (-0800) Subject: Actually error out if preset/tune/profile is invalid X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=9e35bd0f915e92c4a48f9ace2af561ae9a27f6e8;p=x264.git Actually error out if preset/tune/profile is invalid Got lost somewhere in the move to libx264-based presets. --- diff --git a/x264.c b/x264.c index 2875dd16..b2ab17c7 100644 --- 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 )