mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-27 10:52:16 -04:00
This is the first part of a fix for reconnection issues with SRT protocol. This part implements the logic on the side of the protocol. The fixes are as follows: - a cleanup of return values of the various functions used. The main libsrt_open function returns OBS_OUTPUT_XXX enum members. But the other functions return now only AVERROR(xxx). - an explicit check of the socket state before returning OBS_OUTPUT_SUCCESS. This fixes an issue due to relying on socket non-blocking mode; in caller mode, the srt_connect function will return a success even before a connection has succeeded since it relies on notifications by srt_epoll_wait. This would prompt obs UI to display a successful reconnection in spite of a failure. Signed-off-by: pkv <pkv@obsproject.com>