Skip to content

Commit

Permalink
simplify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Aug 14, 2023
1 parent 4e85ab9 commit 006ecbd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions muxer_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import (
"github.com/bluenviron/mediacommon/pkg/formats/fmp4"
)

func boolPtr(v bool) *bool {
return &v
}

func targetDuration(segments []muxerSegment) int {
ret := int(0)

Expand Down Expand Up @@ -462,11 +466,8 @@ func (s *muxerServer) generateMediaPlaylist(isDeltaUpdate bool) []byte {

func (s *muxerServer) generateMediaPlaylistMPEGTS() []byte {
pl := &playlist.Media{
Version: 3,
AllowCache: func() *bool {
v := false
return &v
}(),
Version: 3,
AllowCache: boolPtr(false),
TargetDuration: targetDuration(s.segments),
MediaSequence: s.segmentDeleteCount,
}
Expand Down

0 comments on commit 006ecbd

Please sign in to comment.