#EXT-X-ENDLIST is moved to be the last part of the media manifest. Theoretically it can appear anywhere in manifest, so the current placement is not breaking the standard, but not usually is what found in the wild and I believe will help with readability. As any placement is possible, the placement at the end is completely legal.

This commit is contained in:
Vadim Getmanshchuk 2022-04-08 16:27:04 -07:00
parent 3c8368f9a3
commit 2f92e3ae8c

View file

@ -437,9 +437,6 @@ impl MediaPlaylist {
self.discontinuity_sequence
)?;
}
if self.end_list {
writeln!(w, "#EXT-X-ENDLIST")?;
}
if let Some(ref v) = self.playlist_type {
writeln!(w, "#EXT-X-PLAYLIST-TYPE:{}", v)?;
}
@ -455,6 +452,9 @@ impl MediaPlaylist {
for segment in &self.segments {
segment.write_to(w)?;
}
if self.end_list {
writeln!(w, "#EXT-X-ENDLIST")?;
}
Ok(())
}