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:
parent
89d5262289
commit
8d231e37af
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user