History

avfilter/graphparser: Do not ignore scale_sws_opts if args == NULL

Michael Niedermayer committed 11 years ago

Commit 41e733c1 parent d0e07571 file · +9 −6Browse files

Unified · Split

libavfilter/graphparser.c+9−6
@@ -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);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t