diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-05-05 16:04:49 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-05-05 17:20:13 +0200 |
commit | 217bb59f2e9a7eb1366496a0b3d34e2f5a26d9cc (patch) | |
tree | 718d97dc764c485cc994750171dccc360a25dd17 /libavfilter/af_amerge.c | |
parent | 6f1c82fd5bd1935b4e4ba71fc1ef4cb13730447a (diff) | |
download | ffmpeg-217bb59f2e9a7eb1366496a0b3d34e2f5a26d9cc.tar.gz |
avfilter/af_amerge: set output frame duration
Diffstat (limited to 'libavfilter/af_amerge.c')
-rw-r--r-- | libavfilter/af_amerge.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 |