forked from gwuhaolin/livego
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: publisher close course hls server panic
- Loading branch information
halwu(吴浩麟)
committed
May 30, 2017
1 parent
da522e2
commit 09976a1
Showing
3 changed files
with
22 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package hls | ||
|
||
type TSItem struct { | ||
Name string | ||
SeqNum int | ||
Duration int | ||
Data []byte | ||
} | ||
|
||
func NewTSItem(name string, duration, seqNum int, b []byte) TSItem { | ||
var item TSItem | ||
item.Name = name | ||
item.SeqNum = seqNum | ||
item.Duration = duration | ||
item.Data = make([]byte, len(b)) | ||
copy(item.Data, b) | ||
return item | ||
} |