diff --git a/plugins/obs-outputs/librtmp/rtmp.c b/plugins/obs-outputs/librtmp/rtmp.c index 4e0691ea9..a017b079f 100644 --- a/plugins/obs-outputs/librtmp/rtmp.c +++ b/plugins/obs-outputs/librtmp/rtmp.c @@ -4252,6 +4252,11 @@ RTMP_Close(RTMP *r) r->Link.lFlags ^= RTMP_LF_FTCU; } + memset (&r->m_bindIP, 0, sizeof(r->m_bindIP)); + r->m_bCustomSend = 0; + r->m_customSendFunc = NULL; + r->m_customSendParam = NULL; + #if defined(CRYPTO) || defined(USE_ONLY_MD5) if (!(r->Link.protocol & RTMP_FEATURE_WRITE) || (r->Link.pFlags & RTMP_PUB_CLEAN)) { diff --git a/plugins/obs-outputs/rtmp-stream.c b/plugins/obs-outputs/rtmp-stream.c index 46ddc81ce..d873b64aa 100644 --- a/plugins/obs-outputs/rtmp-stream.c +++ b/plugins/obs-outputs/rtmp-stream.c @@ -825,8 +825,6 @@ static bool rtmp_stream_start(void *data) if (!obs_output_initialize_encoders(stream->output, 0)) return false; - RTMP_Init(&stream->rtmp); - os_atomic_set_bool(&stream->connecting, true); return pthread_create(&stream->connect_thread, NULL, connect_thread, stream) == 0;