Repository navigation
v0.10.36: wait for the lock
A second viewer no longer gets a silent stream.
Fixed
- go2rtc spawns one producer per viewer. If the previous producer had not
released the video lock, the new one exited at once and wrote nothing, so the
stream had no tracks and DESCRIBE hung until the timeout. Measured: first
ffprobeanswered in 3.9 s, the second timed out at 15 s. - The producer now writes its header and starts the filler before asking for the
lock, and waits for it instead of giving up. A new viewer gets tracks straight
away and picks up the real session when the previous one ends.
Verified
TestAcquireVideoLockWaitTakesOverreleases the lock from another goroutine
and checks the waiter takes over,TestAcquireVideoLockWaitGivesUpWhenAskedNotToWait
covers the zero wait,TestLockWaitDefaultthe default of 300 s.gofmt,go vetclean, full suite green in 8.6 s.
Not verified
- Two consecutive viewers against the add-on with this version: pending deploy.