A discontinuity in an HLS stream means the player must reset its decoder state across the boundary — the timestamps in the next segment do not continue smoothly, the codec parameters might change (different SPS/PPS for H.264, different moov for fMP4), and the audio track might have a different sample rate or channel layout. The #EXT-X-DISCONTINUITY tag warns the player so it can flush its decoder, fetch a new initialisation segment if needed, and resync to the new timeline.
The most common cause is server-side ad insertion. When the SSAI server stitches an ad's segments into the live or VOD stream, those ad segments come from a different encoder with different timestamps and possibly different encoding parameters. The packager places #EXT-X-DISCONTINUITY before the first ad segment and another before the first content segment that follows. SCTE-35 ad markers in the upstream feed drive these placements.
Discontinuities also appear at programme boundaries (Channel A ends, Channel B begins on the same stream), at codec changes (HD content followed by 4K content with a different codec), and at recovery from upstream failures (encoder restart). Players that don't handle #EXT-X-DISCONTINUITY properly will glitch, freeze, or skip past ad blocks — a recurring source of QoE bugs.
The book · Volume 2 of 7
Video Streaming: A Complete Guide to Video Delivery: From Network Protocols and Transport to Ingest, HLS, and MPEG-DASH
EXT-X-DISCONTINUITY is easy to forget, and when it is missing at an ad break or source switch the player stalls or loses sync. Volume 2 covers the tag in detail within HLS: playlists and segments, timestamps, packaging, CMAF and how segment protocols handle changes in a stream. Written by Nikolay Sapunov, CEO at Fora Soft.
Getting playback errors around EXT-X-DISCONTINUITY at ad breaks?
We will audit your HLS playlists at ad and source boundaries and fix the discontinuity handling that breaks playback. 250+ video products shipped since 2005.