revid: fix rtmp sending

Approved-by: kortschak <dan@kortschak.io>
This commit is contained in:
Saxon Milton 2018-12-28 03:09:41 +00:00 committed by kortschak
parent 081007b091
commit 5a181f3576
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ func (p *packer) Write(frame []byte) (int, error) {
} }
p.packetCount++ p.packetCount++
now = time.Now() now = time.Now()
if now.Sub(prevTime) > clipDuration && p.packetCount%7 == 0 { if (p.owner.config.Output1 != Rtmp && now.Sub(prevTime) > clipDuration && p.packetCount%7 == 0) || p.owner.config.Output1 == Rtmp {
p.owner.buffer.Flush() p.owner.buffer.Flush()
p.packetCount = 0 p.packetCount = 0
prevTime = now prevTime = now