1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

af_aresample: consistently use ROUNDED_DIV

This fixes issues with negative timestamps

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-26 20:17:16 +01:00
parent 89d5262289
commit 8d231e37af

View File

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