mirror of
https://github.com/Monibuca/engine.git
synced 2025-09-26 20:41:29 +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 {
|
||||
puber := iPub.GetPublisher()
|
||||
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)))
|
||||
s.pubLocker.Lock()
|
||||
defer s.pubLocker.Unlock()
|
||||
|
@@ -131,7 +131,7 @@ func (r *AVRingReader) ReadFrame(mode int) (err error) {
|
||||
if err = r.readFrame(); err != nil {
|
||||
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 {
|
||||
time.Sleep(fast)
|
||||
}
|
||||
|
Reference in New Issue
Block a user