[FFmpeg-cvslog] lavfi/graphparser: fix parsing error in case of NULL sws_opts addition

Stefano Sabatini git at videolan.org
Sun Oct 21 22:45:38 CEST 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Mon Oct 15 10:18:13 2012 +0200| [2969abd908f12c7f6a49aa5a1c14a33af5d094ae] | committer: Stefano Sabatini

lavfi/graphparser: fix parsing error in case of NULL sws_opts addition

If sws_opts was NULL it was resulting in the args being set to
"W:H:(null)", which with the new parsing code was generating a syntax
failure.

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

 libavfilter/graphparser.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index c34651f..8792d1e 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -123,7 +123,8 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
         return ret;
     }
 
-    if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")) {
+    if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")
+        && ctx->scale_sws_opts) {
         snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
                  args, ctx->scale_sws_opts);
         args = tmp_args;



More information about the ffmpeg-cvslog mailing list