Skip to content

v0.10.36: wait for the lock

Choose a tag to compare

@gnacho gnacho released this 06 Nov 00:13
· 22 commits to main since this release

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
    ffprobe answered 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

  • TestAcquireVideoLockWaitTakesOver releases the lock from another goroutine
    and checks the waiter takes over, TestAcquireVideoLockWaitGivesUpWhenAskedNotToWait
    covers the zero wait, TestLockWaitDefault the default of 300 s.
  • gofmt, go vet clean, full suite green in 8.6 s.

Not verified

  • Two consecutive viewers against the add-on with this version: pending deploy.