Skip to content

Commit

Permalink
libobs: Fix sending unclamped audio to output handler
Browse files Browse the repository at this point in the history
The variable `input.conversion.allow_clipping` was left uninitialized.
This could result in randomly sending unclamped audio to the output
handlers that did not request the conversion.
  • Loading branch information
norihiro authored and RytoEX committed Sep 26, 2024
1 parent de2f1fc commit 1dc87ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libobs/media-io/audio-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,10 @@ bool audio_output_connect(audio_t *audio, size_t mi,

if (audio_get_input_idx(audio, mi, callback, param) == DARRAY_INVALID) {
struct audio_mix *mix = &audio->mixes[mi];
struct audio_input input;
input.callback = callback;
input.param = param;
struct audio_input input = {
.callback = callback,
.param = param,
};

if (conversion) {
input.conversion = *conversion;
Expand Down

0 comments on commit 1dc87ca

Please sign in to comment.