Skip to content

Commit

Permalink
Don't attempt to use an unavailable cubeb_stream in aaudio_stream_init.
Browse files Browse the repository at this point in the history
  • Loading branch information
padenot committed Jul 31, 2023
1 parent 41344b3 commit b9af56c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cubeb_aaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1228,13 +1228,12 @@ aaudio_stream_init(cubeb * ctx, cubeb_stream ** stream,
break;
}

stm->in_use.store(true);

if (!stm) {
LOG("Error: maximum number of streams reached");
return CUBEB_ERROR;
}

stm->in_use.store(true);
stm->context = ctx;
stm->user_ptr = user_ptr;
stm->data_callback = data_callback;
Expand Down

0 comments on commit b9af56c

Please sign in to comment.