avfilter/af_amerge: set output frame duration
This commit is contained in:
parent
6f1c82fd5b
commit
217bb59f2e
@ -243,6 +243,10 @@ static int try_push_frame(AVFilterContext *ctx, int nb_samples)
|
|||||||
outbuf->pts = inbuf[0]->pts;
|
outbuf->pts = inbuf[0]->pts;
|
||||||
|
|
||||||
outbuf->nb_samples = nb_samples;
|
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)
|
if ((ret = av_channel_layout_copy(&outbuf->ch_layout, &outlink->ch_layout)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user