|
|
@@ -1041,9 +1041,12 @@ 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);
|
|
|
|
|
|
+ // apparently TLS will not properly persist through connections
|
|
|
+ RTMP_TLS_Free(&stream->rtmp);
|
|
|
+ RTMP_TLS_Init(&stream->rtmp);
|
|
|
+
|
|
|
// since we don't call RTMP_Init above, there's no other good place
|
|
|
// to reset this as doing it in RTMP_Close breaks the ugly RTMP
|
|
|
// authentication system
|