Skip to content

Commit

Permalink
Start segment indices at 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Thor77 committed Jun 13, 2021
1 parent 35ff213 commit 7275e9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func publishHandler(conn *rtmp.Conn) {
return
}

var i uint8 = 0
var i uint8 = 1
clientConnected := true
var lastPacketTime time.Duration = 0
for clientConnected {
Expand Down Expand Up @@ -170,7 +170,7 @@ func publishHandler(conn *rtmp.Conn) {

// increase segment index
if i == (math.MaxUint8 - 1) {
i = 0
i = 1
} else {
i++
}
Expand Down

0 comments on commit 7275e9e

Please sign in to comment.