obs-outputs: Close stream in send thread

master
jp9000 2015-11-18 07:49:51 -08:00
parent ee55dafe24
commit ba7b53f330
1 changed files with 3 additions and 3 deletions

View File

@ -187,10 +187,8 @@ static void *rtmp_stream_actual_stop(void *data)
struct rtmp_stream *stream = data;
void *ret;
if (stream->active) {
if (stream->active)
pthread_join(stream->send_thread, &ret);
RTMP_Close(&stream->rtmp);
}
os_event_reset(stream->stop_event);
@ -384,6 +382,8 @@ static void *send_thread(void *data)
info("User stopped the stream");
}
RTMP_Close(&stream->rtmp);
if (!stopping(stream)) {
pthread_detach(stream->send_thread);
obs_output_signal_stop(stream->output, OBS_OUTPUT_DISCONNECTED);