Unified · Split
| @@ -118,13 +118,16 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind · 117 unmodified lines | |||
| 118 | return AVERROR(ENOMEM); | 118 | return AVERROR(ENOMEM); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") && | 121 | if (!strcmp(filt_name, "scale") && (!args || !strstr(args, "flags")) && |
| 122 | ctx->scale_sws_opts) { | 122 | ctx->scale_sws_opts) { |
| 123 | tmp_args = av_asprintf("%s:%s", | 123 | if (args) { |
| 124 | args, ctx->scale_sws_opts); | 124 | tmp_args = av_asprintf("%s:%s", |
| 125 | if (!tmp_args) | 125 | args, ctx->scale_sws_opts); |
| 126 | return AVERROR(ENOMEM); | 126 | if (!tmp_args) |
| 127 | args = tmp_args; | 127 | return AVERROR(ENOMEM); |
| 128 | args = tmp_args; | ||
| 129 | } else | ||
| 130 | args = ctx->scale_sws_opts; | ||
| 128 | } | 131 | } |
| 129 | 132 | ||
| 130 | ret = avfilter_init_str(*filt_ctx, args); | 133 | ret = avfilter_init_str(*filt_ctx, args); |