[FFmpeg-cvslog] avfilter/af_amerge: set output frame duration
Paul B Mahol
git at videolan.org
Fri May 5 18:22:59 EEST 2023
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri May 5 16:04:49 2023 +0200| [217bb59f2e9a7eb1366496a0b3d34e2f5a26d9cc] | committer: Paul B Mahol
avfilter/af_amerge: set output frame duration
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=217bb59f2e9a7eb1366496a0b3d34e2f5a26d9cc
---
libavfilter/af_amerge.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c
index 8bcc0ac5be..801e592870 100644
--- a/libavfilter/af_amerge.c
+++ b/libavfilter/af_amerge.c
@@ -243,6 +243,10 @@ static int try_push_frame(AVFilterContext *ctx, int nb_samples)
outbuf->pts = inbuf[0]->pts;
outbuf->nb_samples = nb_samples;
+ outbuf->duration = av_rescale_q(outbuf->nb_samples,
+ av_make_q(1, outlink->sample_rate),
+ outlink->time_base);
+
if ((ret = av_channel_layout_copy(&outbuf->ch_layout, &outlink->ch_layout)) < 0)
return ret;
#if FF_API_OLD_CHANNEL_LAYOUT
More information about the ffmpeg-cvslog
mailing list