lavfi: fix pts rescaling in the resampler

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-05-16 03:54:04 +02:00
parent 75492cce8e
commit efdc895fbd
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
outsamplesref->audio->sample_rate = outlink->sample_rate; outsamplesref->audio->sample_rate = outlink->sample_rate;
outsamplesref->audio->nb_samples = n_out; outsamplesref->audio->nb_samples = n_out;
outsamplesref->pts = insamplesref->pts == AV_NOPTS_VALUE ? AV_NOPTS_VALUE : outsamplesref->pts = insamplesref->pts == AV_NOPTS_VALUE ? AV_NOPTS_VALUE :
av_rescale(outlink->sample_rate, insamplesref->pts, inlink ->sample_rate); av_rescale_q(insamplesref->pts, inlink->time_base, outlink->time_base);
ff_filter_samples(outlink, outsamplesref); ff_filter_samples(outlink, outsamplesref);
avfilter_unref_buffer(insamplesref); avfilter_unref_buffer(insamplesref);