PR #24482 opened by lkeegan
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24482
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24482.patch

resolves #24481

Signed-off-by: Liam Keegan <[email protected]>


>From 92313076cb06427e93e90c8f908d9a63e0164311 Mon Sep 17 00:00:00 2001
From: Liam Keegan <[email protected]>
Date: Mon, 14 Sep 2026 15:12:51 +0200
Subject: [PATCH] avfilter/af_adelay: wait for input before emitting the
 leading silence

resolves #24481

Signed-off-by: Liam Keegan <[email protected]>
---
 libavfilter/af_adelay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_adelay.c b/libavfilter/af_adelay.c
index 0ce65e7b9b..5ee52157c4 100644
--- a/libavfilter/af_adelay.c
+++ b/libavfilter/af_adelay.c
@@ -402,7 +402,7 @@ static int activate(AVFilterContext *ctx)
     if (s->next_pts == AV_NOPTS_VALUE && pts != AV_NOPTS_VALUE)
         s->next_pts = av_rescale_q(pts, inlink->time_base, outlink->time_base);
 
-    if (s->padding) {
+    if (s->padding && (s->input || s->eof)) {
         int nb_samples = FFMIN(s->padding, 2048);
 
         frame = ff_get_audio_buffer(outlink, nb_samples);
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to