lavf: make compute_chapters_end less picky.