diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-10-15 10:18:13 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-10-21 21:44:45 +0200 |
commit | 2969abd908f12c7f6a49aa5a1c14a33af5d094ae (patch) | |
tree | 74414d0be23aefe5d3e6793a7a06e99d9782506a | |
parent | 8c2dbc3805009010fdf6b72d6129fa9fc417321a (diff) | |
download | ffmpeg-2969abd908f12c7f6a49aa5a1c14a33af5d094ae.tar.gz |
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.
-rw-r--r-- | libavfilter/graphparser.c | 3 |
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; |