obs-outputs: Stop output after joining send thread

The encoders were stopping before processing was completed, which could
cause the output to access data that's potentially invalidated.
This commit is contained in:
jp9000
2015-09-17 14:17:41 -07:00
parent 88996aef73
commit c107181b9f

View File

@@ -152,9 +152,9 @@ static void rtmp_stream_stop(void *data)
pthread_join(stream->connect_thread, &ret);
if (stream->active) {
obs_output_end_data_capture(stream->output);
os_sem_post(stream->send_sem);
pthread_join(stream->send_thread, &ret);
obs_output_end_data_capture(stream->output);
RTMP_Close(&stream->rtmp);
}