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.
---
 fftools/ffmpeg_filter.c | 8 ++++++++
 1 file changed, 8 insertions(+)

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)) {
-- 
2.39.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to