From 9411c548d39a2f57a711a60942782a660cd3ac5f Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Fri, 3 Sep 2021 18:09:33 +0200 Subject: [PATCH] obs-outputs: Disable Windows socket loop when using RTMPS Since this is activated after starting the output, it assumes there is no need to read anything from the connection as RTMP is send-only from that point on. However with TLS, reading protocol messages is required for proper operation, causing it to immediately fail on RTMPS connections. This is a complex fix due to the way it interacts with librtmp and mbedTLS so let's just disable it for now to avoid breaking things for users. --- plugins/obs-outputs/rtmp-stream.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/obs-outputs/rtmp-stream.c b/plugins/obs-outputs/rtmp-stream.c index 18cb18cd0..5a57bfdb3 100644 --- a/plugins/obs-outputs/rtmp-stream.c +++ b/plugins/obs-outputs/rtmp-stream.c @@ -1112,6 +1112,13 @@ static bool init_connect(struct rtmp_stream *stream) stream->low_latency_mode = obs_data_get_bool(settings, OPT_LOWLATENCY_ENABLED); + // ugly hack for now, can be removed once new loop is reworked + if (stream->new_socket_loop && + !strncmp(stream->path.array, "rtmps://", 8)) { + warn("Disabling network optimizations, not compatible with RTMPS"); + stream->new_socket_loop = false; + } + obs_data_release(settings); return true; }