mirror of https://bitbucket.org/ausocean/av.git
mts: set nalbasedpsi to false for audio
This commit is contained in:
parent
e7a02a818f
commit
c3df750175
|
@ -150,10 +150,12 @@ type Encoder struct {
|
|||
func NewEncoder(dst io.WriteCloser, rate float64, mediaType int) *Encoder {
|
||||
var mPid int
|
||||
var sid byte
|
||||
nbp := true
|
||||
switch mediaType {
|
||||
case EncodeAudio:
|
||||
mPid = AudioPid
|
||||
sid = audioStreamID
|
||||
nbp = false
|
||||
case EncodeH265:
|
||||
mPid = VideoPid
|
||||
sid = H265ID
|
||||
|
@ -180,7 +182,7 @@ func NewEncoder(dst io.WriteCloser, rate float64, mediaType int) *Encoder {
|
|||
writePeriod: time.Duration(float64(time.Second) / rate),
|
||||
ptsOffset: ptsOffset,
|
||||
|
||||
nalBasedPSI: true,
|
||||
nalBasedPSI: nbp,
|
||||
|
||||
pktCount: 8,
|
||||
|
||||
|
|
Loading…
Reference in New Issue