summaryrefslogtreecommitdiff
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-08 12:40:34 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-08 13:24:52 +0200
commit41e733c1ef201f9dbfc51635519fb7632835fda7 (patch)
tree95554d532e1f74f980a102afb1d4ef083b897a20 /libavfilter/graphparser.c
parentd0e0757e9a965549a63fa7f6f7c4542883f80d18 (diff)
avfilter/graphparser: Do not ignore scale_sws_opts if args == NULL
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r--libavfilter/graphparser.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index dd331d12c0..9e6fe6abdc 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -118,13 +118,16 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
return AVERROR(ENOMEM);
}
- if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") &&
+ if (!strcmp(filt_name, "scale") && (!args || !strstr(args, "flags")) &&
ctx->scale_sws_opts) {
- tmp_args = av_asprintf("%s:%s",
- args, ctx->scale_sws_opts);
- if (!tmp_args)
- return AVERROR(ENOMEM);
- args = tmp_args;
+ if (args) {
+ tmp_args = av_asprintf("%s:%s",
+ args, ctx->scale_sws_opts);
+ if (!tmp_args)
+ return AVERROR(ENOMEM);
+ args = tmp_args;
+ } else
+ args = ctx->scale_sws_opts;
}
ret = avfilter_init_str(*filt_ctx, args);