From: Fiona Glaser Date: Wed, 9 Jul 2014 19:21:33 +0000 (-0700) Subject: Check pf_log is set in validate_parameters X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08d36b3fc975d049aa3786ca34fb0b2f2ba0007c;p=libx264 Check pf_log is set in validate_parameters Help remind people to call x264_param_default in case they didn't read the documentation. --- diff --git a/encoder/encoder.c b/encoder/encoder.c index 5305f75b..1ea341b2 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -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 ) {