aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-08-26 19:14:52 +0200
committerPaul B Mahol <onemda@gmail.com>2021-08-26 19:23:03 +0200
commita6f00d4e82a20354715053b21144bd8c3523db1c (patch)
tree5dfad022ca8caa0a373aba330abcba7d2941cc1f
parent3e24e8108d62eeee5453aee206370a273ab12a24 (diff)
downloadffmpeg-a6f00d4e82a20354715053b21144bd8c3523db1c.tar.gz
avfilter/aeval: fix forgotten EOF case for activate
Bring fate test how it was previously.
-rw-r--r--libavfilter/aeval.c6
-rw-r--r--tests/ref/fate/ffmpeg-filter_complex_audio2
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