1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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.
This commit is contained in:
Stefano Sabatini 2012-10-15 10:18:13 +02:00
parent 8c2dbc3805
commit 2969abd908

View File

@ -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;