librtmp: Clean up our extra RTMP fields on close

master
Richard Stanway 2017-02-22 03:51:13 +01:00 committed by jp9000
parent 935223be34
commit f8617bd359
2 changed files with 5 additions and 2 deletions

View File

@ -4252,6 +4252,11 @@ RTMP_Close(RTMP *r)
r->Link.lFlags ^= RTMP_LF_FTCU; 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 defined(CRYPTO) || defined(USE_ONLY_MD5)
if (!(r->Link.protocol & RTMP_FEATURE_WRITE) || (r->Link.pFlags & RTMP_PUB_CLEAN)) if (!(r->Link.protocol & RTMP_FEATURE_WRITE) || (r->Link.pFlags & RTMP_PUB_CLEAN))
{ {

View File

@ -825,8 +825,6 @@ static bool rtmp_stream_start(void *data)
if (!obs_output_initialize_encoders(stream->output, 0)) if (!obs_output_initialize_encoders(stream->output, 0))
return false; return false;
RTMP_Init(&stream->rtmp);
os_atomic_set_bool(&stream->connecting, true); os_atomic_set_bool(&stream->connecting, true);
return pthread_create(&stream->connect_thread, NULL, connect_thread, return pthread_create(&stream->connect_thread, NULL, connect_thread,
stream) == 0; stream) == 0;