Files
srs/trunk/research/players
OSSRS-AI a3a2fa5ceb AI: Fix race condition causing immediate deletion of new sources. v7.0.127 (#4449) (#4576)
**Problem**: Newly created sources (RTMP/SRT/RTC/RTSP) were being
immediately marked as "dead" and deleted by the cleanup timer before
publishers could connect, causing "new live source, dead=1" errors.

**Root Cause**: All source constructors initialized `stream_die_at_ =
0`, causing `stream_is_dead()` to return `true` immediately since
current time was always greater than `0 + 3 seconds`.

**Solution**: Changed all four source constructors to initialize
`stream_die_at_ = srs_time_now_cached()`, giving newly created sources a
proper 3-second grace period before cleanup.
2025-11-13 21:24:07 -05:00
..