[theora-dev] Seek issue in cortado player

Timothy B. Terriberry tterribe at email.unc.edu
Mon Mar 15 17:37:46 PDT 2010

salsaman wrote:
> 2) Begin reading pages until we get at least one packet. Then check
> the granulepos to find the first keyframe number (0 or 1). Store this
> as e.g. keyframe_offset.

Note that a stream can begin with any arbitrary offset (e.g., a live
stream that was joined part-way through), not merely 0 or 1. The actual
difference between 0 and 1 for normal, complete streams, however, is
determined by the subminor version field in the info header, and relates
to how a timestamp is computed from a granule position. You must respect
this version field if you are going to accurately synchronize multiple
streams, regardless of what the granule position of the first frame is.

More information about the theora-dev mailing list