Fix integer overflow when seeking in long videos