lavfi/scale: avoid to print a NULL value in log message
authorStefano Sabatini <stefasab@gmail.com>
Wed, 31 Oct 2012 14:45:28 +0000 (15:45 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Wed, 31 Oct 2012 14:46:46 +0000 (15:46 +0100)
Fix possible crash occurring when libc does not support NULL printing.

libavfilter/vf_scale.c

index 82a777c..b259799 100644 (file)
@@ -153,8 +153,8 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
     if (!scale->h_expr)
         av_opt_set(scale, "h", "ih", 0);
 
-    av_log(ctx, AV_LOG_VERBOSE, "w:%s h:%s flags:%s interl:%d\n",
-           scale->w_expr, scale->h_expr, scale->flags_str, scale->interlaced);
+    av_log(ctx, AV_LOG_VERBOSE, "w:%s h:%s flags:'%s' interl:%d\n",
+           scale->w_expr, scale->h_expr, (char *)av_x_if_null(scale->flags_str, ""), scale->interlaced);
 
     scale->flags = SWS_BILINEAR;
     if (scale->flags_str) {