Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #271343

Category ffmpeg
Changed by Bogdan Lisman <bogdanohnoyoudont@pydevsolutions.com>
Changed at Tue 16 Jun 2026 17:59:52
Repository https://git.ffmpeg.org/ffmpeg.git
Project ffmpeg
Branch master
Revision d69e8d0a955c0248052619b9c05fa3dc7ce49986

Comments

avcodec/decode: reset PTS correction counters in ff_decode_flush_buffers
pts_correction_num_faulty_pts and pts_correction_num_faulty_dts were not
cleared by ff_decode_flush_buffers(), so they survived avcodec_flush_buffers().
After a seek, guess_correct_pts() therefore kept biasing its reordered-pts vs
dts choice on pre-seek history instead of starting fresh as it does after
ff_decode_preinit(), which already zeroes both counters. This could yield an
incorrect AVFrame.best_effort_timestamp on the frames following a seek.

Reset both counters on flush, next to the existing last_pts/last_dts reset, so
the decoder's timestamp-correction state is fully reinitialized.

Fixes: ticket #11645
Reported-by: keks51
Signed-off-by: Bogdan Lisman <bogdan@pydevsolutions.com>

Changed files