fix stts entry sample count bug
This commit is contained in:
parent
a405187d47
commit
7d11ff6303
4
muxer.go
4
muxer.go
@ -48,6 +48,7 @@ func (self *Muxer) newTrack() *Track {
|
|||||||
Header: &atom.MediaHeader{
|
Header: &atom.MediaHeader{
|
||||||
TimeScale: 0, // fill later
|
TimeScale: 0, // fill later
|
||||||
Duration: 0, // fill later
|
Duration: 0, // fill later
|
||||||
|
Language: 21956,
|
||||||
},
|
},
|
||||||
Info: &atom.MediaInfo{
|
Info: &atom.MediaInfo{
|
||||||
Sample: track.sample,
|
Sample: track.sample,
|
||||||
@ -190,6 +191,9 @@ func (self *Track) WriteSample(pts int64, dts int64, isKeyFrame bool, data []byt
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *Track) fillTrackAtom() (err error) {
|
func (self *Track) fillTrackAtom() (err error) {
|
||||||
|
if self.sampleIndex > 0 {
|
||||||
|
self.sttsEntry.Count++
|
||||||
|
}
|
||||||
if self.Type == H264 {
|
if self.Type == H264 {
|
||||||
self.sample.SampleDesc.Avc1Desc.Conf.Record, err = atom.CreateAVCDecoderConfRecord(
|
self.sample.SampleDesc.Avc1Desc.Conf.Record, err = atom.CreateAVCDecoderConfRecord(
|
||||||
self.sps,
|
self.sps,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user