From b060d8661442a3aa41185137530edcb9f7b96b2c Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 5 Jul 2014 15:01:10 -0700 Subject: [PATCH] If reconnecting, ignore the disconnect code Usually if you are reconnecting after network outage, it will give a different code (such as OBS_OUTPUT_CONNECT_FAILED). So, if already reconnecting, ignore the code unless it's OBS_OUTPUT_SUCCESS. --- libobs/obs-output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libobs/obs-output.c b/libobs/obs-output.c index 016c4c340..6e33ae57e 100644 --- a/libobs/obs-output.c +++ b/libobs/obs-output.c @@ -769,7 +769,8 @@ void obs_output_signal_stop(obs_output_t output, int code) return; obs_output_end_data_capture(output); - if (code == OBS_OUTPUT_DISCONNECTED) + if ((output->reconnecting && code != OBS_OUTPUT_SUCCESS) || + code == OBS_OUTPUT_DISCONNECTED) output_reconnect(output); else signal_stop(output, code);