aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_filter.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-05-11 12:02:49 +0200
committerAnton Khirnov <anton@khirnov.net>2023-05-22 17:10:44 +0200
commit2628c7049ec15e52f267a1a019f7cf38a6cd87b4 (patch)
treeb771f435064a65cf54815bbb75fa88e707b7c18f /fftools/ffmpeg_filter.c
parenta16d7171d1e1ee03ab2473257e275ac2a8c265bf (diff)
downloadffmpeg-2628c7049ec15e52f267a1a019f7cf38a6cd87b4.tar.gz
fftools/ffmpeg_filter: try configuring graphs from input EOF
When a filtergraph input receives EOF but never saw any input frames, we use the fallback parameters. Currently an attempt to actually configure the filtergraph will happen elsewhere, but there is no reason to postpone this.
Diffstat (limited to 'fftools/ffmpeg_filter.c')
-rw-r--r--fftools/ffmpeg_filter.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 8eca0f2cae..6323278d15 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -1533,6 +1533,14 @@ int ifilter_send_eof(InputFilter *ifilter, int64_t pts, AVRational tb)
&ifp->fallback.ch_layout);
if (ret < 0)
return ret;
+
+ if (ifilter_has_all_input_formats(ifilter->graph)) {
+ ret = configure_filtergraph(ifilter->graph);
+ if (ret < 0) {
+ av_log(NULL, AV_LOG_ERROR, "Error initializing filters!\n");
+ return ret;
+ }
+ }
}
if (ifilter->format < 0 && (ifilter->type == AVMEDIA_TYPE_AUDIO || ifilter->type == AVMEDIA_TYPE_VIDEO)) {