Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #272384

Category ffmpeg
Changed by Kacper Michajłow <kasper93ohnoyoudont@gmail.com>
Changed at Tue 23 Jun 2026 20:40:28
Repository https://git.ffmpeg.org/ffmpeg.git
Project ffmpeg
Branch master
Revision e27ad5760c0c8eca7c95bb907dc6e4e62dbf129b

Comments

avformat/hls: rebase seek discard threshold to each playlist's DTS baseline
After a seek, hls_read_packet drops packets until each playlist reaches
seek_timestamp. That threshold lives on c->first_timestamp's baseline,
i.e. the DTS of whichever stream produced the very first packet. Streams
can have different DTS baselines though. So comparing one stream's
threshold against another stream's DTS is wrong. A stream whose first
keyframe precedes the global baseline gets its segment keyframe dropped
and resumes a segment (or more) late.

Track the first DTS per playlist and rebase the threshold onto each
playlist's own baseline. Since HLS segments are presentation-aligned
across renditions, every stream then resumes at the same presentation
time. seek_timestamp keeps its meaning on the global timeline, only the
per-playlist comparison value is translated.

This fixes playlists that would be unable to play from the start, and
instead skip one or more segments, before data is output.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>

Changed files