mirror of
https://github.com/aler9/gortsplib
synced 2025-10-21 14:19:36 +08:00
simplify examples (#493)
This commit is contained in:
@@ -15,9 +15,10 @@ func durationGoToMPEGTS(v time.Duration) int64 {
|
||||
|
||||
// mpegtsMuxer allows to save a H265 stream into a MPEG-TS file.
|
||||
type mpegtsMuxer struct {
|
||||
vps []byte
|
||||
sps []byte
|
||||
pps []byte
|
||||
fileName string
|
||||
vps []byte
|
||||
sps []byte
|
||||
pps []byte
|
||||
|
||||
f *os.File
|
||||
b *bufio.Writer
|
||||
@@ -29,7 +30,7 @@ type mpegtsMuxer struct {
|
||||
// initialize initializes a mpegtsMuxer.
|
||||
func (e *mpegtsMuxer) initialize() error {
|
||||
var err error
|
||||
e.f, err = os.Create("mystream.ts")
|
||||
e.f, err = os.Create(e.fileName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user