]> git.sesse.net Git - x264/commitdiff
Check pf_log is set in validate_parameters
authorFiona Glaser <fiona@x264.com>
Wed, 9 Jul 2014 19:21:33 +0000 (12:21 -0700)
committerFiona Glaser <fiona@x264.com>
Sun, 20 Jul 2014 03:53:02 +0000 (20:53 -0700)
Help remind people to call x264_param_default in case they didn't read the
documentation.

encoder/encoder.c

index 5305f75b7bdbfa03c028e4d47b0ea5915e9a4824..1ea341b24f530e015f9060488377091ad3c9ebc4 100644 (file)
@@ -415,6 +415,12 @@ static void x264_encoder_thread_init( x264_t *h )
 
 static int x264_validate_parameters( x264_t *h, int b_open )
 {
+    if( !h->param.pf_log )
+    {
+        x264_log( NULL, X264_LOG_ERROR, "pf_log not set! did you forget to call x264_param_default?\n" );
+        return -1;
+    }
+
 #if HAVE_MMX
     if( b_open )
     {