untangledco / streaming

Media streaming and broadcast systems in Go

Home Page:https://twitch.tv/untangledco

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ollytom opened this issue · comments

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.