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

Showing the changes to libavfilter/graphparser.c (1 of 1 file). Show all

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
118118 return AVERROR(ENOMEM);
119119 }
120120
121− if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") &&
121+ if (!strcmp(filt_name, "scale") && (!args || !strstr(args, "flags")) &&
122122 ctx->scale_sws_opts) {
123− tmp_args = av_asprintf("%s:%s",
124− args, ctx->scale_sws_opts);
125− if (!tmp_args)
126− return AVERROR(ENOMEM);
127− args = tmp_args;
123+ if (args) {
124+ tmp_args = av_asprintf("%s:%s",
125+ args, ctx->scale_sws_opts);
126+ if (!tmp_args)
127+ return AVERROR(ENOMEM);
128+ args = tmp_args;
129+ } else
130+ args = ctx->scale_sws_opts;
128131 }
129132
130133 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