Add op_get_last_page() for calculating duration.
Using op_get_prev_page_serial() meant if there were valid pages from another stream, we would re-scan them all repeatedly until we managed to back up, a page at a time, to a chunk with a page from the preferred stream with a valid granule position. Breaking this case into its own function means we can guarantee we only scan each page once, and that we can stop as soon as we hit a page from a different link (in the unlikely event that the stream has no pages with valid timestamps).
Loading
Please register or sign in to comment