mirror of https://bitbucket.org/ausocean/av.git
stream: reverted some changes I made to tick() in both mts encoder and rtp encoder
This commit is contained in:
parent
f1625d27f5
commit
9e9e349cbf
|
@ -267,9 +267,7 @@ func (e *Encoder) writePSI() error {
|
||||||
|
|
||||||
// tick advances the clock one frame interval.
|
// tick advances the clock one frame interval.
|
||||||
func (e *Encoder) tick() {
|
func (e *Encoder) tick() {
|
||||||
now := time.Now()
|
e.clock += e.frameInterval
|
||||||
e.clock += now.Sub(e.lastTime)
|
|
||||||
e.lastTime = now
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// pts retuns the current presentation timestamp.
|
// pts retuns the current presentation timestamp.
|
||||||
|
|
|
@ -121,9 +121,7 @@ func (e *Encoder) Encode(payload []byte) error {
|
||||||
|
|
||||||
// tick advances the clock one frame interval.
|
// tick advances the clock one frame interval.
|
||||||
func (e *Encoder) tick() {
|
func (e *Encoder) tick() {
|
||||||
now := time.Now()
|
e.clock += e.frameInterval
|
||||||
e.clock += now.Sub(e.lastTime)
|
|
||||||
e.lastTime = now
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// nxtTimestamp gets the next timestamp
|
// nxtTimestamp gets the next timestamp
|
||||||
|
|
Loading…
Reference in New Issue