fftools/ffmpeg_filter: silence valgrind warning

This commit is contained in:
Paul B Mahol 2021-08-24 09:24:55 +02:00
parent 507fdcd1b0
commit 8cbed82b2a

View File

@ -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;