SIGN IN SIGN UP

Mp4Extractor: Enforce logical timestamp sorting for IT35 metadata

To ensure dynamic IT35 metadata is available to the video renderer
exactly when the corresponding video frame is processed, the
Mp4Extractor must guarantee that IT35 metadata samples are loaded
before any video samples that share or exceed their timestamp.

Previously, if an MP4 was poorly muxed (with metadata physically
located after video), the extractor would yield the video frames
first, causing them to be rendered without their associated dynamic
metadata. This change explicitly forces the Extractor to read from
an IT35 metadata track if its next sample's timestamp is less than
or equal to the next available video timestamp.

#cherrypick

PiperOrigin-RevId: 947019492
(cherry picked from commit 941e475c8b2af5556da6c8f757ee1df3e652f993)
R
rohks committed
6f542f2fa4ac8bd76b376da79dc84f0f98fff2e3
Parent: 7c3cfa9
Committed by Tianyi Feng <tianyifeng@google.com> on 7/13/2026, 2:05:53 PM