Commit: 71d19c6c84162ea5f46c850d30561a4ec6b25fce
Parent: 85bee521c7375d48be96dc2de88a8ec2a173fc57
Author: Iulia Tanasescu <iulia.tanasescu@nxp.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-10-25 18:36:44
Tree: 568757785fd1adca301690ec068dd78554d1646b

shared/bap: Fix broadcast set state When a stream changes state, the update is notified to other drivers that registered a state changed callback. These callbacks might further change the stream state, leading to the stream being freed. To avoid use after free errors post notifications, this commit adds support to ref/unref streams, to make sure that the stream is kept alive until all processing is completed. This also updates the switch condition post notifications, to handle the stream based on its current state.

Diffstat

M src/shared/bap.c | 45 +++++++++++++++++++++++++++++++++++++++- - - - - -

1 files changed, 39 insertions(+), 6 deletions(-)

View Full Diff | Patch