From cf0a5e5c97aef6b368a8cad9f4eef3480ffd75cb Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 15 Mar 2020 04:41:17 -0700 Subject: [PATCH] libobs: Fix audio not playing back with audio lines The fix for the race condition that was made in 432017b2c also broke audio lines. This fixes audio lines and moves the fix to just the case where it actually applied. --- libobs/obs-source.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index 85b3c329d..a67bb4985 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -4589,12 +4589,16 @@ static inline void process_audio_source_tick(obs_source_t *source, void obs_source_audio_render(obs_source_t *source, uint32_t mixers, size_t channels, size_t sample_rate, size_t size) { - if (!source->audio_output_buf[0][0] || !source->context.data) { + if (!source->audio_output_buf[0][0]) { source->audio_pending = true; return; } if (source->info.audio_render) { + if (!source->context.data) { + source->audio_pending = true; + return; + } custom_audio_render(source, mixers, channels, sample_rate); return; }