Skip to content
Snippets Groups Projects
Commit d1c8352d authored by François Cartegnie's avatar François Cartegnie :fingers_crossed:
Browse files

demux: ogg: seek to keyframes (fix #3417, #9284)

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.
parent 546da072
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment