Commit b5049814 authored by Baptiste Coudurier's avatar Baptiste Coudurier

Use default graph swscale opts when no opts are supplied

Originally committed as revision 24016 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent f96363df
......@@ -81,6 +81,7 @@ static AVFilterContext *create_filter(AVFilterGraph *ctx, int index,
AVFilter *filt;
char inst_name[30];
char tmp_args[256];
snprintf(inst_name, sizeof(inst_name), "Filter %d %s", index, filt_name);
......@@ -104,6 +105,12 @@ static AVFilterContext *create_filter(AVFilterGraph *ctx, int index,
return NULL;
}
if (!strcmp(filt_name, "scale") && !strstr(args, "flags")) {
snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
args, ctx->scale_sws_opts);
args = tmp_args;
}
if(avfilter_init_filter(filt_ctx, args, NULL)) {
av_log(log_ctx, AV_LOG_ERROR,
"error initializing filter '%s' with args '%s'\n", filt_name, args);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment