1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avfilter/af_amerge: set output frame duration

This commit is contained in:
Paul B Mahol 2023-05-05 16:04:49 +02:00
parent 6f1c82fd5b
commit 217bb59f2e

View File

@ -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