[SCM] libav/experimental: Use default graph swscale opts when no opts are supplied

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:10:12 UTC 2013


The following commit has been merged in the experimental branch:
commit b5049814838c63915e42fb4789d88ccc11446e2f
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Sat Jul 3 03:12:29 2010 +0000

    Use default graph swscale opts when no opts are supplied
    
    Originally committed as revision 24016 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 3fe8524..46d7676 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);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list