From 33834be9c804fbedc5c66fbabc7dfe4fd7feeb05 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 14 Jun 2014 04:22:58 +0200 Subject: [PATCH] avfilter/af_asetnsamples: fix pts handling when timebase and 1/samplerate differ Signed-off-by: Michael Niedermayer --- libavfilter/af_asetnsamples.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c index fbcf275743..e830643115 100644 --- a/libavfilter/af_asetnsamples.c +++ b/libavfilter/af_asetnsamples.c @@ -116,7 +116,7 @@ static int push_samples(AVFilterLink *outlink) outsamples->pts = asns->next_out_pts; if (asns->next_out_pts != AV_NOPTS_VALUE) - asns->next_out_pts += nb_out_samples; + asns->next_out_pts += av_rescale_q(nb_out_samples, (AVRational){1, outlink->sample_rate}, outlink->time_base); ret = ff_filter_frame(outlink, outsamples); if (ret < 0)