fix h264 mp4 bug

This commit is contained in:
deepch 2022-08-04 21:11:38 +03:00
parent 030575e585
commit 61aa8e4f72

View File

@ -6,6 +6,8 @@ import (
"io"
"time"
"github.com/deepch/vdk/codec/h265parser"
"github.com/deepch/vdk/av"
"github.com/deepch/vdk/codec/aacparser"
"github.com/deepch/vdk/codec/h264parser"
@ -120,7 +122,7 @@ func (self *Stream) fillTrackAtom() (err error) {
self.trackAtom.Header.TrackWidth = float64(width)
self.trackAtom.Header.TrackHeight = float64(height)
} else if self.Type() == av.H265 {
codec := self.CodecData.(h264parser.CodecData)
codec := self.CodecData.(h265parser.CodecData)
width, height := codec.Width(), codec.Height()
self.sample.SampleDesc.HV1Desc = &mp4io.HV1Desc{
DataRefIdx: 1,