Commit 96ac8663 authored by Michael Niedermayer's avatar Michael Niedermayer

af_aresample: Consider the swresample delay during calculating timestamps.

The difference from this should be pretty small.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 4def5d2b
......@@ -184,7 +184,9 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
if(insamplesref->pts != AV_NOPTS_VALUE) {
aresample->next_pts =
outsamplesref->pts = av_rescale_q(insamplesref->pts, inlink->time_base, outlink->time_base);
outsamplesref->pts = av_rescale_q(insamplesref->pts, inlink->time_base, outlink->time_base)
- swr_get_delay(aresample->swr, outlink->time_base.den);
av_assert0(outlink->time_base.num == 1);
} else{
outsamplesref->pts = AV_NOPTS_VALUE; //aresample->next_pts;
}
......
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