simplify examples (#493)

This commit is contained in:
Alessandro Ros
2024-01-01 19:56:40 +01:00
committed by GitHub
parent 013a8d8463
commit bcd17a992c
8 changed files with 28 additions and 20 deletions

View File

@@ -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
}