Skip to content

Commit

Permalink
Merge pull request #32 from bradleyfalzon/segment-key
Browse files Browse the repository at this point in the history
Use segment Keyformat and Keyformatversions on MediaPlaylist.Encode()
  • Loading branch information
grafov committed Jan 9, 2016
2 parents c84e6d9 + be34e44 commit 45b0e3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,14 +464,14 @@ func (p *MediaPlaylist) Encode() *bytes.Buffer {
p.buf.WriteString(",IV=")
p.buf.WriteString(seg.Key.IV)
}
if p.Key.Keyformat != "" {
if seg.Key.Keyformat != "" {
p.buf.WriteString(",KEYFORMAT=\"")
p.buf.WriteString(p.Key.Keyformat)
p.buf.WriteString(seg.Key.Keyformat)
p.buf.WriteRune('"')
}
if p.Key.Keyformatversions != "" {
if seg.Key.Keyformatversions != "" {
p.buf.WriteString(",KEYFORMATVERSIONS=\"")
p.buf.WriteString(p.Key.Keyformatversions)
p.buf.WriteString(seg.Key.Keyformatversions)
p.buf.WriteRune('"')
}
p.buf.WriteRune('\n')
Expand Down

0 comments on commit 45b0e3f

Please sign in to comment.