X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libavfilter%2Faf_amerge.c;h=6ef05e213f4b8a753c3e86add017c02c281f4bf9;hb=2b01b7918beebe7b392ebf255f887e396a59e4c6;hp=8bcc0ac5be915beaf89446320f1bfbf190d4a48d;hpb=55e5af3c03898ffbac352fe4af83208fa4129c71;p=platform%2Fupstream%2Fffmpeg.git diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c index 8bcc0ac..6ef05e2 100644 --- a/libavfilter/af_amerge.c +++ b/libavfilter/af_amerge.c @@ -30,6 +30,7 @@ #include "avfilter.h" #include "filters.h" #include "audio.h" +#include "formats.h" #include "internal.h" #define SWR_CH_MAX 64 @@ -243,6 +244,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