aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-07-03 03:12:29 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-07-03 03:12:29 +0000
commitb5049814838c63915e42fb4789d88ccc11446e2f (patch)
tree23b6ada298d6f6de6ce73c651673282677a1b614 /libavfilter/graphparser.c
parentf96363df7a1b504307ef6c234513f117036b7bff (diff)
downloadffmpeg-b5049814838c63915e42fb4789d88ccc11446e2f.tar.gz
Use default graph swscale opts when no opts are supplied
Originally committed as revision 24016 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r--libavfilter/graphparser.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 3fe8524ad3..46d7676093 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -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);