mirror of https://git.ffmpeg.org/ffmpeg.git
lavfi: fix pts rescaling in the resampler
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
75492cce8e
commit
efdc895fbd
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue