untangledco / streaming

Media streaming and broadcast systems in Go
https://twitch.tv/untangledco
ISC License
82 stars 5 forks source link

scte35: can we use copy() in other places? #15

Closed ollytom closed 2 months ago

ollytom commented 2 months ago

Found one place in break_duration.go. Instead of

p[1] = pts[1]
p[2] = pts[2]
p[3] = pts[3]
...

We can use the copy() builtin:

copy(p[1:], pts[1:])

There may be other places we can do this shortening? Worth having a quick look. Either way, we can at least apply this in break_duration.go.