From 7af9c2d8824ad55be8382e5a7b129f4027f92117 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 1 May 2016 15:13:16 -0700 Subject: [PATCH] libobs: Don't prematurely stop transition audio Transition audio was programmed to stop if there is no queued audio from both sources. Because of that, when a source's audio started after the transition started, it would cause audio from the source to be excluded from the transition until the transition had completed because the audio had already been marked as stopped. Instead, if there's no audio from the transition sources, the audio should only be marked as stopped when video has stopped. This allows the to/from sources to have an opportunity to start/restart audio during the transition safely. --- libobs/obs-source-transition.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libobs/obs-source-transition.c b/libobs/obs-source-transition.c index 18e955340..fb079dd45 100644 --- a/libobs/obs-source-transition.c +++ b/libobs/obs-source-transition.c @@ -824,7 +824,8 @@ bool obs_transition_audio_render(obs_source_t *transition, if (min_ts) copy_transition_state(transition, &state); - } else if (transition->transitioning_audio) { + } else if (!transition->transitioning_video && + transition->transitioning_audio) { stopped = stop_audio(transition); }