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 {
|
func NewEncoder(dst io.WriteCloser, rate float64, mediaType int) *Encoder {
|
||||||
var mPid int
|
var mPid int
|
||||||
var sid byte
|
var sid byte
|
||||||
|
nbp := true
|
||||||
switch mediaType {
|
switch mediaType {
|
||||||
case EncodeAudio:
|
case EncodeAudio:
|
||||||
mPid = AudioPid
|
mPid = AudioPid
|
||||||
sid = audioStreamID
|
sid = audioStreamID
|
||||||
|
nbp = false
|
||||||
case EncodeH265:
|
case EncodeH265:
|
||||||
mPid = VideoPid
|
mPid = VideoPid
|
||||||
sid = H265ID
|
sid = H265ID
|
||||||
|
@ -180,7 +182,7 @@ func NewEncoder(dst io.WriteCloser, rate float64, mediaType int) *Encoder {
|
||||||
writePeriod: time.Duration(float64(time.Second) / rate),
|
writePeriod: time.Duration(float64(time.Second) / rate),
|
||||||
ptsOffset: ptsOffset,
|
ptsOffset: ptsOffset,
|
||||||
|
|
||||||
nalBasedPSI: true,
|
nalBasedPSI: nbp,
|
||||||
|
|
||||||
pktCount: 8,
|
pktCount: 8,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue