Commit 8d231e37 authored by Michael Niedermayer's avatar Michael Niedermayer

af_aresample: consistently use ROUNDED_DIV

This fixes issues with negative timestamps
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 89d52622
......@@ -243,7 +243,8 @@ static int request_frame(AVFilterLink *outlink)
if(aresample->next_pts != AV_NOPTS_VALUE)
aresample->next_pts += av_rescale_q(n_out, (AVRational){1 ,outlink->sample_rate}, outlink->time_base);
#else
outsamplesref->pts = (swr_next_pts(aresample->swr, INT64_MIN) + inlink->sample_rate/2) / inlink->sample_rate;
outsamplesref->pts = swr_next_pts(aresample->swr, INT64_MIN);
outsamplesref->pts = ROUNDED_DIV(outsamplesref->pts, inlink->sample_rate);
#endif
ff_filter_samples(outlink, outsamplesref);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment