image/svg+xml FFmpeg sources are by far the most complicated, so we consider those only.Hardest video case:Content frames arrive with ContentTime; this is converted to DCP time and checked for validity against_video_position. _video_position is incremented by one DCP frame period each time a frame is emitted.Emission is timestamped with _video_position.In general, the Decoded::dcp_time is used as a check against the actual position in the DCP (basedon what has been emitted).Hardest audio case:Timestamps are not sample-accurate, here B should be after A but its timestamp says different. Thingsare further complicated by resampling, which renders timestamps invalid. The upshot is that audiotimestamps are basically useless. However, since audio is (apparently) always continuous in content fileswe can make our own timestamps. A B C D BLACK A D B C C BLACK (outside content, so black) (repeat) CONTENT DCP(at higher frame rate) A B C D