Skip to content

Commit

Permalink
aubuf: fix coverity defect
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh committed Jan 14, 2024
1 parent ba844d9 commit 6f9765b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rem/aubuf/aubuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,12 @@ void aubuf_read_auframe(struct aubuf *ab, struct auframe *af)
return;

sz = auframe_size(af);

mtx_lock(ab->lock);

if (!ab->ajb && ab->mode == AUBUF_ADAPTIVE)
ab->ajb = ajb_alloc(ab->silence, ab->wish_sz);

mtx_lock(ab->lock);
as = ajb_get(ab->ajb, af);
if (as == AJB_LOW) {
#if AUBUF_DEBUG
Expand Down

0 comments on commit 6f9765b

Please sign in to comment.