[vlc-commits] demux: ogg: seek to keyframes (fix #3417, #9284)

Francois Cartegnie git at videolan.org
Sun Oct 13 15:54:21 CEST 2013


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Sep 19 21:28:28 2013 +0200| [d1c8352d4312dfb012022241866ade506b514f4c] | committer: Francois Cartegnie

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d1c8352d4312dfb012022241866ade506b514f4c
---

 modules/demux/ogg.c     |  187 ++++++++---
 modules/demux/ogg.h     |   19 +-
 modules/demux/oggseek.c |  790 +++++++++++++++++++++++++++++++++++++++--------
 modules/demux/oggseek.h |   10 +
 4 files changed, 827 insertions(+), 179 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=d1c8352d4312dfb012022241866ade506b514f4c


More information about the vlc-commits mailing list