mirror of
https://github.com/Monibuca/engine.git
synced 2025-12-24 13:18:07 +08:00
fix: submode=2 don't limit speed
This commit is contained in:
3
io.go
3
io.go
@@ -229,6 +229,9 @@ func (io *IO) receive(streamPath string, specific common.IIO) error {
|
|||||||
if !isSubscribe {
|
if !isSubscribe {
|
||||||
puber := iPub.GetPublisher()
|
puber := iPub.GetPublisher()
|
||||||
conf := puber.Config
|
conf := puber.Config
|
||||||
|
if io.Args.Get("bufferTime") != "" {
|
||||||
|
conf.BufferTime, _ = time.ParseDuration(io.Args.Get("bufferTime"))
|
||||||
|
}
|
||||||
io.Info("publish", zap.String("ptr", fmt.Sprintf("%p", iPub)))
|
io.Info("publish", zap.String("ptr", fmt.Sprintf("%p", iPub)))
|
||||||
s.pubLocker.Lock()
|
s.pubLocker.Lock()
|
||||||
defer s.pubLocker.Unlock()
|
defer s.pubLocker.Unlock()
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ func (r *AVRingReader) ReadFrame(mode int) (err error) {
|
|||||||
if err = r.readFrame(); err != nil {
|
if err = r.readFrame(); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if mode != SUBMODE_REAL {
|
if mode == SUBMODE_NOJUMP {
|
||||||
if fast := r.Value.Timestamp - r.FirstTs - time.Since(r.startTime); fast > 0 && fast < time.Second {
|
if fast := r.Value.Timestamp - r.FirstTs - time.Since(r.startTime); fast > 0 && fast < time.Second {
|
||||||
time.Sleep(fast)
|
time.Sleep(fast)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user