rename av.H264CodecData
This commit is contained in:
parent
baa18a4731
commit
4d6509b267
4
muxer.go
4
muxer.go
@ -97,7 +97,7 @@ func (self *Stream) fillTrackAtom() (err error) {
|
|||||||
self.trackAtom.Media.Header.Duration = int(self.duration)
|
self.trackAtom.Media.Header.Duration = int(self.duration)
|
||||||
|
|
||||||
if self.Type() == av.H264 {
|
if self.Type() == av.H264 {
|
||||||
codec := self.CodecData.(av.H264CodecData)
|
codec := self.CodecData.(h264parser.CodecData)
|
||||||
width, height := codec.Width(), codec.Height()
|
width, height := codec.Width(), codec.Height()
|
||||||
self.sample.SampleDesc.Avc1Desc = &atom.Avc1Desc{
|
self.sample.SampleDesc.Avc1Desc = &atom.Avc1Desc{
|
||||||
DataRefIdx: 1,
|
DataRefIdx: 1,
|
||||||
@ -122,7 +122,7 @@ func (self *Stream) fillTrackAtom() (err error) {
|
|||||||
self.trackAtom.Header.TrackHeight = atom.IntToFixed(int(height))
|
self.trackAtom.Header.TrackHeight = atom.IntToFixed(int(height))
|
||||||
|
|
||||||
} else if self.Type() == av.AAC {
|
} else if self.Type() == av.AAC {
|
||||||
codec := self.CodecData.(av.AACCodecData)
|
codec := self.CodecData.(aacparser.CodecData)
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
if err = isom.WriteElemStreamDesc(buf, codec.MPEG4AudioConfigBytes(), uint(self.trackAtom.Header.TrackId)); err != nil {
|
if err = isom.WriteElemStreamDesc(buf, codec.MPEG4AudioConfigBytes(), uint(self.trackAtom.Header.TrackId)); err != nil {
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user