mirror of
https://github.com/rutgersc/m3u8-rs.git
synced 2025-03-13 09:42:39 +00:00
Improve #EXT-X-INDEPENDENT-SEGMENTS placement
While it can be anywhere in the playlist as it applies to, this one usually is at the top of the manifest, right after the VERSION tag.
This commit is contained in:
parent
2ed1c18337
commit
5d7403e5fe
1 changed files with 6 additions and 6 deletions
|
@ -188,6 +188,9 @@ impl MasterPlaylist {
|
|||
if let Some(ref v) = self.version {
|
||||
writeln!(w, "#EXT-X-VERSION:{}", v)?;
|
||||
}
|
||||
if self.independent_segments {
|
||||
writeln!(w, "#EXT-X-INDEPENDENT-SEGMENTS")?;
|
||||
}
|
||||
|
||||
for alternative in &self.alternatives {
|
||||
alternative.write_to(w)?;
|
||||
|
@ -205,9 +208,6 @@ impl MasterPlaylist {
|
|||
if let Some(ref start) = self.start {
|
||||
start.write_to(w)?;
|
||||
}
|
||||
if self.independent_segments {
|
||||
writeln!(w, "#EXT-X-INDEPENDENT-SEGMENTS")?;
|
||||
}
|
||||
for unknown_tag in &self.unknown_tags {
|
||||
writeln!(w, "{}", unknown_tag)?;
|
||||
}
|
||||
|
@ -746,6 +746,9 @@ impl MediaPlaylist {
|
|||
if let Some(ref v) = self.version {
|
||||
writeln!(w, "#EXT-X-VERSION:{}", v)?;
|
||||
}
|
||||
if self.independent_segments {
|
||||
writeln!(w, "#EXT-X-INDEPENDENT-SEGMENTS")?;
|
||||
}
|
||||
writeln!(w, "#EXT-X-TARGETDURATION:{}", self.target_duration)?;
|
||||
|
||||
if self.media_sequence != 0 {
|
||||
|
@ -767,9 +770,6 @@ impl MediaPlaylist {
|
|||
if let Some(ref start) = self.start {
|
||||
start.write_to(w)?;
|
||||
}
|
||||
if self.independent_segments {
|
||||
writeln!(w, "#EXT-X-INDEPENDENT-SEGMENTS")?;
|
||||
}
|
||||
for segment in &self.segments {
|
||||
segment.write_to(w)?;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue