Skip to content
  • François Cartegnie's avatar
    demux: ogg: seek to keyframes (fix #3417, #9284) · d1c8352d
    François Cartegnie authored
    This patch changes the way seeking is done.
    
    Previously it was a dumb stream size based seeking, and was
    very approximative with multi-streams or non fixed bitrate
    stream.
    
    There was some code in oggseek to bisect search for frames,
    which i previously linked to opus seeking, but it was
    not reusable by all codecs as the ogg spec says granule to
    absolute time is one way only.
    
    New code does bisect search using absolute time only, and
    then tries to sync to a specific keyframe (if codec has any),
    backward or forward by checking packets.
    
    Bisect and backward searchs are disabled for non FASTSEEK inputs.
    In that case, it just behaves like any other player and syncs
    to the next keyframe.
    
    DirectShow/OggDS has also been fixed.
    d1c8352d