[x264-devel] commit: Actually error out if preset/tune/profile is invalid ( Jason Garrett-Glaser )

git version control git at videolan.org
Tue Feb 23 11:19:38 CET 2010


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Tue Feb 23 02:18:07 2010 -0800| [9e35bd0f915e92c4a48f9ace2af561ae9a27f6e8] | committer: Jason Garrett-Glaser 

Actually error out if preset/tune/profile is invalid
Got lost somewhere in the move to libx264-based presets.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=9e35bd0f915e92c4a48f9ace2af561ae9a27f6e8
---

 x264.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/x264.c b/x264.c
index 2875dd1..b2ab17c 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 )



More information about the x264-devel mailing list