From 2969abd908f12c7f6a49aa5a1c14a33af5d094ae Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Mon, 15 Oct 2012 10:18:13 +0200 Subject: [PATCH] lavfi/graphparser: fix parsing error in case of NULL sws_opts addition If sws_opts was NULL it was resulting in the args being set to "W:H:(null)", which with the new parsing code was generating a syntax failure. --- libavfilter/graphparser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index c34651f131..8792d1ee5f 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -123,7 +123,8 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind return ret; } - if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")) { + if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") + && ctx->scale_sws_opts) { snprintf(tmp_args, sizeof(tmp_args), "%s:%s", args, ctx->scale_sws_opts); args = tmp_args; -- 2.11.0