diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-05-21 19:16:39 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-05-31 16:15:47 +0200 |
commit | da7ae627e1a6e0af46790b0ff1c58214ae178093 (patch) | |
tree | 85618767584656ec596d21ab88762e7ebe009110 /fftools/ffmpeg_filter.c | |
parent | badf959ed6264ad4fce6e8e815e5dd9a5743c848 (diff) | |
download | ffmpeg-da7ae627e1a6e0af46790b0ff1c58214ae178093.tar.gz |
fftools/ffmpeg_filter: always pass graph description to fg_create()
Currently NULL would be passed for simple filtergraphs, which would
make the filter code extract the graph description from the output
stream when needed. This is unnecessarily convoluted.
Diffstat (limited to 'fftools/ffmpeg_filter.c')
-rw-r--r-- | fftools/ffmpeg_filter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index e11ae2e9bf..75317139ba 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -352,7 +352,8 @@ FilterGraph *fg_create(char *graph_desc) return fg; } -int init_simple_filtergraph(InputStream *ist, OutputStream *ost) +int init_simple_filtergraph(InputStream *ist, OutputStream *ost, + char *graph_desc) { FilterGraph *fg; FilterGraphPriv *fgp; @@ -360,7 +361,7 @@ int init_simple_filtergraph(InputStream *ist, OutputStream *ost) InputFilter *ifilter; int ret; - fg = fg_create(NULL); + fg = fg_create(graph_desc); if (!fg) report_and_exit(AVERROR(ENOMEM)); fgp = fgp_from_fg(fg); @@ -1263,8 +1264,7 @@ int configure_filtergraph(FilterGraph *fg) AVBufferRef *hw_device; AVFilterInOut *inputs, *outputs, *cur; int ret, i, simple = filtergraph_is_simple(fg); - const char *graph_desc = simple ? fg->outputs[0]->ost->avfilter : - fgp->graph_desc; + const char *graph_desc = fgp->graph_desc; cleanup_filtergraph(fg); if (!(fg->graph = avfilter_graph_alloc())) |