Merge pull request #1402 from admshao/compressor-segfault

obs-filters: Fix segfault in Compressor Filter
master
Jim 2018-08-02 23:52:31 -07:00 committed by GitHub
commit a4150c7d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -442,6 +442,9 @@ static struct obs_audio_data *compressor_filter_audio(void *data,
struct compressor_data *cd = data; struct compressor_data *cd = data;
const uint32_t num_samples = audio->frames; const uint32_t num_samples = audio->frames;
if (num_samples == 0)
return audio;
float **samples = (float**)audio->data; float **samples = (float**)audio->data;
pthread_mutex_lock(&cd->sidechain_update_mutex); pthread_mutex_lock(&cd->sidechain_update_mutex);