[FFmpeg-cvslog] r24016 - trunk/libavfilter/graphparser.c

bcoudurier subversion
Sat Jul 3 05:12:29 CEST 2010


Author: bcoudurier
Date: Sat Jul  3 05:12:29 2010
New Revision: 24016

Log:
Use default graph swscale opts when no opts are supplied

Modified:
   trunk/libavfilter/graphparser.c

Modified: trunk/libavfilter/graphparser.c
==============================================================================
--- trunk/libavfilter/graphparser.c	Sat Jul  3 05:11:04 2010	(r24015)
+++ trunk/libavfilter/graphparser.c	Sat Jul  3 05:12:29 2010	(r24016)
@@ -81,6 +81,7 @@ static AVFilterContext *create_filter(AV
 
     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(AV
         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);



More information about the ffmpeg-cvslog mailing list