Explorar o código

obs-outputs: Always call RTMP_Init before connecting

Clears/reinitializes RTMP structure to defaults, preventing data from
potentially persisting between different connections.

Closes jp9000/obs-studio#878
SoraYuki %!s(int64=8) %!d(string=hai) anos
pai
achega
0ea0b99aa0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      plugins/obs-outputs/rtmp-stream.c

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

@@ -718,7 +718,7 @@ static int try_connect(struct rtmp_stream *stream)
 
 	info("Connecting to RTMP URL %s...", stream->path.array);
 
-	memset(&stream->rtmp.Link, 0, sizeof(stream->rtmp.Link));
+	RTMP_Init(&stream->rtmp);
 	if (!RTMP_SetupURL(&stream->rtmp, stream->path.array))
 		return OBS_OUTPUT_BAD_PATH;