mirror of https://bitbucket.org/ausocean/av.git
Merged in revert-encoder-timing (pull request #148)
stream: reverted timing changes from most recent PR
This commit is contained in:
commit
9b57306aed
|
@ -248,9 +248,7 @@ func (e *Encoder) writePSI() error {
|
|||
|
||||
// tick advances the clock one frame interval.
|
||||
func (e *Encoder) tick() {
|
||||
now := time.Now()
|
||||
e.clock += now.Sub(e.lastTime)
|
||||
e.lastTime = now
|
||||
e.clock += e.frameInterval
|
||||
}
|
||||
|
||||
// pts retuns the current presentation timestamp.
|
||||
|
|
|
@ -121,9 +121,7 @@ func (e *Encoder) Encode(payload []byte) error {
|
|||
|
||||
// tick advances the clock one frame interval.
|
||||
func (e *Encoder) tick() {
|
||||
now := time.Now()
|
||||
e.clock += now.Sub(e.lastTime)
|
||||
e.lastTime = now
|
||||
e.clock += e.frameInterval
|
||||
}
|
||||
|
||||
// nxtTimestamp gets the next timestamp
|
||||
|
|
Loading…
Reference in New Issue