mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
libobs: Don't render audio if context not initialized
Fixes a race where the audio subsystem could call audio render callbacks before the source was fully initialized.
This commit is contained in:
+1
-1
@@ -4595,7 +4595,7 @@ static inline void process_audio_source_tick(obs_source_t *source,
|
|||||||
void obs_source_audio_render(obs_source_t *source, uint32_t mixers,
|
void obs_source_audio_render(obs_source_t *source, uint32_t mixers,
|
||||||
size_t channels, size_t sample_rate, size_t size)
|
size_t channels, size_t sample_rate, size_t size)
|
||||||
{
|
{
|
||||||
if (!source->audio_output_buf[0][0]) {
|
if (!source->audio_output_buf[0][0] || !source->context.data) {
|
||||||
source->audio_pending = true;
|
source->audio_pending = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user