[FFmpeg-cvslog] avfilter/af_join: set output frame duration

Paul B Mahol git at videolan.org
Fri May 5 18:23:04 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri May  5 16:07:07 2023 +0200| [24f16b798e9bcd1090c47e64b53ec5c62c4f3f0a] | committer: Paul B Mahol

avfilter/af_join: set output frame duration

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

 libavfilter/af_join.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index dc075a8b27..605d73d2cc 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -520,6 +520,10 @@ static int try_push_frame(AVFilterContext *ctx)
     }
 
     frame->nb_samples     = nb_samples;
+    frame->duration = av_rescale_q(frame->nb_samples,
+                                   av_make_q(1, outlink->sample_rate),
+                                   outlink->time_base);
+
 #if FF_API_OLD_CHANNEL_LAYOUT
 FF_DISABLE_DEPRECATION_WARNINGS
     frame->channel_layout = outlink->channel_layout;



More information about the ffmpeg-cvslog mailing list