diff mbox series

[FFmpeg-devel,19/24] fftools/ffmpeg_filter: drop unreachable code

Message ID 20230528091416.17927-19-anton@khirnov.net
State Accepted
Commit 2262df5e8a5a4ae2c3ac44e0bf970f683270362f
Headers show
Series [FFmpeg-devel,01/24] fftools/ffmpeg_mux_init: merge ost_add_from_filter() to ost_add() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov May 28, 2023, 9:14 a.m. UTC
Filtergraphs with no inputs are initialized as soon as all their outputs
are bound, so this code should not be reachable.
---
 fftools/ffmpeg_filter.c | 11 -----------
 1 file changed, 11 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index ce2a914745..e0843b0729 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -1946,17 +1946,6 @@  int fg_transcode_step(FilterGraph *graph, InputStream **best_ist)
     int nb_requests, nb_requests_max = 0;
     InputStream *ist;
 
-    if (!graph->graph && ifilter_has_all_input_formats(graph)) {
-        // graph has not been configured yet, but everything is ready;
-        // this can happen for graphs with no inputs, or when some input
-        // EOF'ed with zero frames and fallback parameters were used
-        ret = configure_filtergraph(graph);
-        if (ret < 0) {
-            av_log(NULL, AV_LOG_ERROR, "Error reinitializing filters!\n");
-            return ret;
-        }
-    }
-
     if (!graph->graph) {
         for (int i = 0; i < graph->nb_inputs; i++) {
             InputFilter *ifilter = graph->inputs[i];