[FFmpeg-cvslog] avfilter/graphparser: Do not ignore scale_sws_opts if args == NULL

Michael Niedermayer git at videolan.org
Sat Aug 8 13:26:50 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Aug  8 12:40:34 2015 +0200| [41e733c1ef201f9dbfc51635519fb7632835fda7] | committer: Michael Niedermayer

avfilter/graphparser: Do not ignore scale_sws_opts if args == NULL

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=41e733c1ef201f9dbfc51635519fb7632835fda7
---

 libavfilter/graphparser.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index dd331d1..9e6fe6a 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -118,13 +118,16 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
         return AVERROR(ENOMEM);
     }
 
-    if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") &&
+    if (!strcmp(filt_name, "scale") && (!args || !strstr(args, "flags")) &&
         ctx->scale_sws_opts) {
-        tmp_args = av_asprintf("%s:%s",
-                 args, ctx->scale_sws_opts);
-        if (!tmp_args)
-            return AVERROR(ENOMEM);
-        args = tmp_args;
+        if (args) {
+            tmp_args = av_asprintf("%s:%s",
+                    args, ctx->scale_sws_opts);
+            if (!tmp_args)
+                return AVERROR(ENOMEM);
+            args = tmp_args;
+        } else
+            args = ctx->scale_sws_opts;
     }
 
     ret = avfilter_init_str(*filt_ctx, args);



More information about the ffmpeg-cvslog mailing list