From c1851987ca2c6e41d1e0e166e959b754e369c254 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 8 Feb 2024 14:07:59 -0500 Subject: [PATCH] shared/bap: Fix crash due to selecting ucast ops for bcast stream The stream ops is based on PAC type not the stream type. --- src/shared/bap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index 804352db9..e26dbf944 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -2062,7 +2062,7 @@ static const struct bt_bap_stream_ops * bap_stream_new_ops(struct bt_bap_stream *stream) { const struct bt_bap_stream_ops *ops; - uint8_t type = bt_bap_stream_get_type(stream); + uint8_t type = bt_bap_pac_get_type(stream->lpac); size_t i; for (i = 0; i < ARRAY_SIZE(stream_ops); i++) { -- 2.47.3