On 7/26/2026 1:34 AM, panboxiaosa via ffmpeg-devel wrote:
Some MOV files combine variable frame rate and B-frames. Their samples
are stored in decode order, but a packet duration describes the interval
until the next frame in presentation order. Using adjacent decode-order
timestamps can therefore assign a duration from an unrelated frame and
cause players to hold the wrong frame after a seek.

For fully indexed video tracks with composition time offsets, build a
table from index timestamps plus CTTS offsets, sort it by presentation
timestamp, and use adjacent presentation timestamps when finalizing
packet durations.

Keep the existing STTS-derived duration for incomplete indexes, invalid
or duplicate timestamps, the final sample, and fragmented inputs whose
index changes after parsing. This preserves existing behavior whenever
a complete and unambiguous presentation-order mapping is unavailable.

Add a self-contained VFR B-frame FATE regression test.


Please see https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23919, this patch breaks at least one test.

And feel free to create a new PR in Forgejo that you can control.

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to