浏览代码

obs-outputs: Clear RTMP data before initiating connect

Sometimes when reconnecting the internal RTMP data is not cleared
(particularly the TLS data). This can cause TLS data to carry over from
one connection to another, causing issues with the secondary connection.
jp9000 3 年之前
父节点
当前提交
e8b2b2092b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      plugins/obs-outputs/rtmp-stream.c

+ 1 - 0
plugins/obs-outputs/rtmp-stream.c

@@ -1041,6 +1041,7 @@ static int try_connect(struct rtmp_stream *stream)
 
 	// on reconnect we need to reset the internal variables of librtmp
 	// otherwise the data sent/received will not parse correctly on the other end
+	memset(&stream->rtmp, 0, sizeof(stream->rtmp));
 	RTMP_Reset(&stream->rtmp);
 
 	// since we don't call RTMP_Init above, there's no other good place