mirror of https://bitbucket.org/ausocean/av.git
Merge branch 'mts-chunking' of https://bitbucket.org/ausocean/av into mts-chunking
This commit is contained in:
commit
baf033c281
|
@ -178,7 +178,7 @@ func (e *Encoder) TimeBasedPsi(b bool, sendCount int) {
|
|||
// sending them to the output channel.
|
||||
func (e *Encoder) Encode(nalu []byte) error {
|
||||
now := time.Now()
|
||||
if (e.timeBasedPsi && (now.Sub(e.psiLastTime) > psiInterval)) || e.pktCount >= e.psiSendCount {
|
||||
if (e.timeBasedPsi && (now.Sub(e.psiLastTime) > psiInterval)) || (!e.timeBasedPsi && (e.pktCount >= e.psiSendCount)) {
|
||||
e.pktCount = 0
|
||||
err := e.writePSI()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue