From bc3944301f4453a82e44c264de01886659082f0c Mon Sep 17 00:00:00 2001 From: jp9000 Date: Fri, 9 Sep 2016 04:45:27 -0700 Subject: [PATCH] libobs: Allow forced stop even when already stopping Allow outputs to force a stop even when already in the process of stopping. If for example a stream is heavily congested and taking a very long time to stop, this allows frontends to give the users the option to forcibly stop the stream to make it stop as quickly as possible. --- libobs/obs-output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libobs/obs-output.c b/libobs/obs-output.c index 21f674550..db84cd6c2 100644 --- a/libobs/obs-output.c +++ b/libobs/obs-output.c @@ -322,7 +322,7 @@ void obs_output_actual_stop(obs_output_t *output, bool force, uint64_t ts) bool call_stop = true; bool was_reconnecting = false; - if (stopping(output)) + if (stopping(output) && !force) return; os_event_reset(output->stopping_event); @@ -391,8 +391,8 @@ void obs_output_force_stop(obs_output_t *output) if (!stopping(output)) { output->stop_code = 0; do_output_signal(output, "stopping"); - obs_output_actual_stop(output, true, 0); } + obs_output_actual_stop(output, true, 0); } bool obs_output_active(const obs_output_t *output) -- GitLab