mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
Use default graph swscale opts when no opts are supplied
Originally committed as revision 24016 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f96363df7a
commit
b504981483
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user