Skip to content

Commit

Permalink
Handle #EXT-X-ENDLIST appended to live playlist without new segment
Browse files Browse the repository at this point in the history
Fixes #5777
  • Loading branch information
robwalch committed Aug 30, 2023
1 parent 1c987c2 commit 108315c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/controller/base-playlist-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ export default class BasePlaylistController implements NetworkComponentAPI {
`live playlist ${index} ${
details.advanced
? 'REFRESHED ' + details.lastPartSn + '-' + details.lastPartIndex
: details.updated
? 'UPDATED'
: 'MISSED'
}`,
);
Expand Down
5 changes: 4 additions & 1 deletion src/loader/level-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ export class LevelDetails {
const partSnDiff = this.lastPartSn - previous.lastPartSn;
const partIndexDiff = this.lastPartIndex - previous.lastPartIndex;
this.updated =
this.endSN !== previous.endSN || !!partIndexDiff || !!partSnDiff;
this.endSN !== previous.endSN ||
!!partIndexDiff ||
!!partSnDiff ||
!this.live;
this.advanced =
this.endSN > previous.endSN ||
partSnDiff > 0 ||
Expand Down
4 changes: 4 additions & 0 deletions src/utils/level-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ export function mergeDetails(
newFrag.initSegment = oldFrag.initSegment;
currentInitSegment = oldFrag.initSegment;
}
if (newFrag.endList) {
// Update frag body for fragment-tracker endListFragments
oldFrag.endList = true;
}
},
);

Expand Down

0 comments on commit 108315c

Please sign in to comment.