SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
24.86k
stars
5.29k
forks
source link
HLS: Support reload HLS asynchronously. v5.0.172 v6.0.67 #3782
Closed
winlinvip closed 10 months ago
When reloading HLS, it directly operates unpublish and publish. At this time, if HLS is pushed, an exception may occur. The crash log is displayed as:
The reason is that these two coroutines operated on the HLS object at the same time, causing a null pointer.
Solution: Use asynchronous reload. During reload, only set variables and let the message processing coroutine implement the reload.
TRANS_BY_GPT4
Co-authored-by: Haibo Chen 495810242@qq.com Co-authored-by: chundonglinlin chundonglinlin@163.com