Skip to content

Commit

Permalink
Fixed bug of writing vod playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
hori-ryota committed Feb 18, 2016
1 parent e98338e commit 8ab23d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ func (p *MediaPlaylist) Encode() *bytes.Buffer {

head := p.head
count := p.count
for i := uint(0); i < p.winsize && count > 0; count-- {
for i := uint(0); i <= p.winsize && count > 0; count-- {
seg = p.Segments[head]
head = (head + 1) % p.capacity
if seg == nil { // protection from badly filled chunklists
Expand Down

0 comments on commit 8ab23d6

Please sign in to comment.