Skip to content
  • Steve Lhomme's avatar
    demux: mkv: shift the timestamps based on the biggest CodecDelay · 45036317
    Steve Lhomme authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
    The CodecDelay needs to be substracted from the PTS of all frames of that
    track. That may result in negative DTS, PTS and PCR which is not well handled.
    So we just shift all timestamps based on the biggest CodecDelay so all
    timestamps are always positive.
    
    This is in line with how libavformat reports the timestamps on frames from a
    track with a CodecDelay.
    
    This is done per segment as other segments may use a different CodecDelay
    per track.
    
    Fixes #25129
    45036317