summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-02-23 19:41:33 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-03 03:48:04 +0100
commit88b02e58299beaad0151d76a4377e90c39944c46 (patch)
tree06a9b757527db7a5bd7e9f6c3d4c3f7abb9d2bb4
parent09e532c5751a5529a50eb94313453505b977c399 (diff)
fftools/ffmpeg_opt: Simplify adding complex filtergraph
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--fftools/ffmpeg_opt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 1202146607..50f0edd332 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -3275,9 +3275,8 @@ static int opt_audio_qscale(void *optctx, const char *opt, const char *arg)
static int opt_filter_complex(void *optctx, const char *opt, const char *arg)
{
- FilterGraph *fg;
- ALLOC_ARRAY_ELEM(filtergraphs, nb_filtergraphs);
- fg = filtergraphs[nb_filtergraphs - 1];
+ FilterGraph *fg = ALLOC_ARRAY_ELEM(filtergraphs, nb_filtergraphs);
+
fg->index = nb_filtergraphs - 1;
fg->graph_desc = av_strdup(arg);
if (!fg->graph_desc)