aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-09-07 15:39:03 +0200
committerAnton Khirnov <anton@khirnov.net>2023-10-10 12:41:31 +0200
commite35d36eb72b915bd0edf8dc37c78c59987c3f430 (patch)
tree532076bea42677acbfa206586b21a621f9bc9a70
parent99567ee8706dd3f17705ddc35c87d1d0912086bc (diff)
downloadffmpeg-e35d36eb72b915bd0edf8dc37c78c59987c3f430.tar.gz
ffools/ffmpeg_filter: stop trying to handle an unreachable state
ifilter_send_eof() will fail if the input has no real or fallback parameters, so there is no need to handle the case of some inputs being in EOF state yet having no parameters.
-rw-r--r--fftools/ffmpeg.c2
-rw-r--r--fftools/ffmpeg.h2
-rw-r--r--fftools/ffmpeg_filter.c10
3 files changed, 6 insertions, 8 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index fd2ce1c2d0..14f55cbec7 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -944,7 +944,7 @@ static int choose_output(OutputStream **post)
INT64_MIN : ost->last_mux_dts;
}
- if (!ost->initialized && !ost->inputs_done && !ost->finished) {
+ if (!ost->initialized && !ost->finished) {
ost_min = ost;
break;
}
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index b059ecbb9f..2e8f1db9b6 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -583,8 +583,6 @@ typedef struct OutputStream {
// parameters are set in the AVStream.
int initialized;
- int inputs_done;
-
const char *attachment_filename;
int keep_pix_fmt;
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index b71a84185a..cfe5bc1d70 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -2081,11 +2081,11 @@ int fg_transcode_step(FilterGraph *graph, InputStream **best_ist)
}
}
- // graph not configured, but all inputs are either initialized or EOF
- for (int i = 0; i < graph->nb_outputs; i++)
- graph->outputs[i]->ost->inputs_done = 1;
-
- return 0;
+ // This state - graph is not configured, but all inputs are either
+ // initialized or EOF - should be unreachable because sending EOF to a
+ // filter without even a fallback format should fail
+ av_assert0(0);
+ return AVERROR_BUG;
}
*best_ist = NULL;