[FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: silence valgrind warning

Paul B Mahol onemda at gmail.com
Tue Aug 24 10:25:56 EEST 2021


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 fftools/ffmpeg_filter.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 49076f13ee..b3f230e8b6 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -975,12 +975,13 @@ int configure_filtergraph(FilterGraph *fg)
                                 AV_DICT_IGNORE_SUFFIX))) {
             av_strlcatf(args, sizeof(args), "%s=%s:", e->key, e->value);
         }
-        if (strlen(args))
+        if (strlen(args)) {
             args[strlen(args)-1] = 0;
 
-        if (!strncmp(args, "sws_flags=", 10)) {
-            // keep the 'flags=' part
-            fg->graph->scale_sws_opts = av_strdup(args+4);
+            if (!strncmp(args, "sws_flags=", 10)) {
+                // keep the 'flags=' part
+                fg->graph->scale_sws_opts = av_strdup(args+4);
+            }
         }
 
         args[0] = 0;
-- 
2.17.1



More information about the ffmpeg-devel mailing list