Browse Source

af_aresample: Consider the swresample delay during calculating timestamps.

The difference from this should be pretty small.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
96ac8663de
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavfilter/af_aresample.c

+ 3
- 1
libavfilter/af_aresample.c View File

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


Loading…
Cancel
Save