From 9e35bd0f915e92c4a48f9ace2af561ae9a27f6e8 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Tue, 23 Feb 2010 02:18:07 -0800 Subject: [PATCH] Actually error out if preset/tune/profile is invalid Got lost somewhere in the move to libx264-based presets. --- x264.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 ) -- 2.47.3