How does SharePlay handle streaming Ad.?

How to handle ads which are dynamically inserted with inconsistent length, it will cause stream out of sync.