BPM initialization occurs with the first call to the `bpm_inject()` callback function. When Stream Delay is active, there is a case where the first call might never happen, specifically if a user stops the stream with the discard delay option before streaming begins. In such a case OBS will crash due to an uninitialized mutex being referenced in `bpm_destroy()`. Use `pthread_once()` in both the `bpm_inject()` callback and `bpm_destroy()` to ensure BPM initialization has occurred. |
||
|---|---|---|
| .. | ||
| bpm-internal.h | ||
| bpm.c | ||
| bpm.h | ||
| CMakeLists.txt | ||