summaryrefslogtreecommitdiff
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-10-15 10:18:13 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-10-21 21:44:45 +0200
commit2969abd908f12c7f6a49aa5a1c14a33af5d094ae (patch)
tree74414d0be23aefe5d3e6793a7a06e99d9782506a /libavfilter/graphparser.c
parent8c2dbc3805009010fdf6b72d6129fa9fc417321a (diff)
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.
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r--libavfilter/graphparser.c3
1 files changed, 2 insertions, 1 deletions
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;