On Wed, 17 Feb 2016 01:13:54 +0700 Muhammad Faiz <mfc...@gmail.com> wrote:
> On Tue, Feb 16, 2016 at 6:22 PM, wm4 <nfx...@googlemail.com> wrote: > > On Tue, 16 Feb 2016 18:01:16 +0700 > > Muhammad Faiz <mfc...@gmail.com> wrote: > ... > >> remaining -= s->remaining_fill; > >> + if (out) { > >> + int64_t pts = av_rescale_q(insamples->pts, > >> inlink->time_base, av_make_q(1, inlink->sample_rate)); > >> + pts += insamples->nb_samples - remaining - s->fft_len/2; > >> + pts = av_rescale_q(pts, av_make_q(1, > >> inlink->sample_rate), outlink->time_base); > >> + if (FFABS(pts - out->pts) > PTS_TOLERANCE) { > >> + av_log(ctx, AV_LOG_DEBUG, "changing pts from > >> %"PRId64" (%.3f) to %"PRId64" (%.3f).\n", > >> + out->pts, out->pts * > >> av_q2d(outlink->time_base), > >> + pts, pts * av_q2d(outlink->time_base)); > >> + out->pts = pts; > >> + s->next_pts = pts + PTS_STEP; > > > > What is this code needed for? The PTS_TOLERANCE thing specifically. > > Because input time_base and output time_base does not match, > there is probability that linear input pts gives non linear output pts, > probably differ by 1, e.g 0 11 20 31 40 ... and I prefer linear output pts. > You may try it with PTS_TOLERANCE set to 0. > Hm ok, that still seems a bit sketchy (a filter shouldn't try to "fix" timestamps), but probably ok. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel