summaryrefslogtreecommitdiff
path: root/libavfilter/af_amix.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-11-28 13:05:49 +0100
committerPaul B Mahol <onemda@gmail.com>2023-11-28 13:17:13 +0100
commitbafbb0697e05e78aca5b3eccc9c64fca8f05249b (patch)
treeba91d0d32020d94ab519642a6c7b84898c0ef104 /libavfilter/af_amix.c
parent358aced447fb1fe11da8bf888dab4e9cade7bcdf (diff)
avfilter/af_amix: set output frame duration
Diffstat (limited to 'libavfilter/af_amix.c')
-rw-r--r--libavfilter/af_amix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 120a97f48c..39353d6642 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -379,6 +379,9 @@ static int output_frame(AVFilterLink *outlink)
av_frame_free(&in_buf);
out_buf->pts = s->next_pts;
+ out_buf->duration = av_rescale_q(out_buf->nb_samples, av_make_q(1, outlink->sample_rate),
+ outlink->time_base);
+
if (s->next_pts != AV_NOPTS_VALUE)
s->next_pts += nb_samples;