[FFmpeg-cvslog] avfilter/aeval: fix forgotten EOF case for activate

Paul B Mahol git at videolan.org
Thu Aug 26 20:23:45 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Aug 26 19:14:52 2021 +0200| [a6f00d4e82a20354715053b21144bd8c3523db1c] | committer: Paul B Mahol

avfilter/aeval: fix forgotten EOF case for activate

Bring fate test how it was previously.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a6f00d4e82a20354715053b21144bd8c3523db1c
---

 libavfilter/aeval.c                        | 6 ++++--
 tests/ref/fate/ffmpeg-filter_complex_audio | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavfilter/aeval.c b/libavfilter/aeval.c
index 5f0f25dd59..6c9aad4654 100644
--- a/libavfilter/aeval.c
+++ b/libavfilter/aeval.c
@@ -272,8 +272,10 @@ static int activate(AVFilterContext *ctx)
     if (!ff_outlink_frame_wanted(outlink))
         return FFERROR_NOT_READY;
 
-    if (eval->duration >= 0 && t >= eval->duration)
-        return AVERROR_EOF;
+    if (eval->duration >= 0 && t >= eval->duration) {
+        ff_outlink_set_status(outlink, AVERROR_EOF, eval->pts);
+        return 0;
+    }
 
     if (eval->duration >= 0) {
         nb_samples = FFMIN(eval->nb_samples, av_rescale(eval->duration, eval->sample_rate, AV_TIME_BASE) - eval->pts);
diff --git a/tests/ref/fate/ffmpeg-filter_complex_audio b/tests/ref/fate/ffmpeg-filter_complex_audio
index 649f0def43..c424675061 100644
--- a/tests/ref/fate/ffmpeg-filter_complex_audio
+++ b/tests/ref/fate/ffmpeg-filter_complex_audio
@@ -6,3 +6,5 @@
 #channel_layout_name 0: mono
 0,       -256,       -256,     1536,      416, 0x3001fb2d
 0,       1280,       1280,     1536,      418, 0xba72fc16
+0,       2816,       2816,     1536,      418, 0xba72fc16
+0,       4352,       4352,     1536,      418, 0xba72fc16



More information about the ffmpeg-cvslog mailing list