Skip to content

Commit

Permalink
Review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
megaadam committed Jan 31, 2022
1 parent 9eaf349 commit 610edb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func decodeLineOfMasterPlaylist(p *MasterPlaylist, state *decodingState, line st
case "CHANNELS":
channels, err := strconv.Atoi(v)
if err != nil {
return fmt.Errorf("non-integer value \"%s\" for CHANNELS attribute", v)
return fmt.Errorf("non-integer value %q for CHANNELS attribute", v)
}
alt.Channels = uint(channels)
}
Expand Down
2 changes: 1 addition & 1 deletion writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ func (p *MasterPlaylist) Encode() *bytes.Buffer {
p.buf.WriteString(alt.URI)
p.buf.WriteRune('"')
}
p.buf.WriteRune('\n')
if alt.Channels != 0 {
p.buf.WriteString(",CHANNELS=\"")
p.buf.WriteString(strconv.FormatUint(uint64(alt.Channels), 10))
p.buf.WriteRune('"')
}
p.buf.WriteRune('\n')
}
}
if pl.Iframe {
Expand Down

0 comments on commit 610edb6

Please sign in to comment.