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.
master
jp9000 2014-07-05 15:01:10 -07:00
parent 544b5e8741
commit b060d86614
1 changed files with 2 additions and 1 deletions

View File

@ -769,7 +769,8 @@ void obs_output_signal_stop(obs_output_t output, int code)
return; return;
obs_output_end_data_capture(output); 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); output_reconnect(output);
else else
signal_stop(output, code); signal_stop(output, code);