Fix crash in create_filter() which occurrs if a scale filter with no args is provided.
Showing the changes to libavfilter/graphparser.c (1 of 1 file). Show all
Unified · Split
| @@ -121,7 +121,7 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind · 120 unmodified lines | ||
| 121 | 121 | return ret; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | − if (!strcmp(filt_name, "scale") && !strstr(args, "flags")) { | |
| 124 | + if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")) { | |
| 125 | 125 | snprintf(tmp_args, sizeof(tmp_args), "%s:%s", |
| 126 | 126 | args, ctx->scale_sws_opts); |
| 127 | 127 | args = tmp_args; |