fix(hls): keep the EXT-X-KEY of another KEYFORMAT in force when a playlist renews one key tag

This commit is contained in:
imSp4rky
2026-12-01 18:58:20 -07:00
parent 3963e80ec3
commit 7a5bac7878
5 changed files with 94 additions and 13 deletions
+3 -2
View File
@@ -387,8 +387,9 @@ least one and no track is left.
### Segment-filtering hooks
- **HLS**: set `track.OnSegmentFilter(segment)` to drop unwanted segments (ads/bumpers).
An `EXT-X-KEY` applies to each later segment until the next `EXT-X-KEY`, also when the
filter or `--sample` drops the segment that carries it. unshackle ignores an `EXT-X-KEY` that
An `EXT-X-KEY` applies to each later segment until the next `EXT-X-KEY` with the same
`KEYFORMAT`, or with another `METHOD`, also when the filter or `--sample` drops the segment
that carries it. `METHOD=NONE` ends every `EXT-X-KEY`. unshackle ignores an `EXT-X-KEY` that
applies to dropped segments only: no licence, no request and no new decryption. It also
ignores the `EXT-X-DISCONTINUITY` of a dropped segment. A dropped ad break thus does not
disturb decryption when the playlist repeats the `EXT-X-KEY` of the title after the break.