From c107181b9f24a510c60b1844d1960c2d0b25f4d2 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 17 Sep 2015 14:17:41 -0700 Subject: [PATCH] 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. --- plugins/obs-outputs/rtmp-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/obs-outputs/rtmp-stream.c b/plugins/obs-outputs/rtmp-stream.c index afe1ed673..76e8298a2 100644 --- a/plugins/obs-outputs/rtmp-stream.c +++ b/plugins/obs-outputs/rtmp-stream.c @@ -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); }