[bluez/bluez] 72b02d: profiles/audio/a2dp: Clear suspend timer on A2DP s...
From: hadess <hidden>
Date: 2025-09-18 13:31:25
Branch: refs/heads/master Home: https://github.com/bluez/bluez Commit: 72b02df3b2b40a3ac38832e2e80a16eb6b3bef04 https://github.com/bluez/bluez/commit/72b02df3b2b40a3ac38832e2e80a16eb6b3bef04 Author: Alex Studer [off-list ref] Date: 2025-09-18 (Thu, 18 Sep 2025) Changed paths: M profiles/audio/a2dp.c Log Message: ----------- profiles/audio/a2dp: Clear suspend timer on A2DP stream free When an A2DP stream is created in start_ind, a timer is set, suspending the AVDTP stream if there have been no users within 5 seconds. However, if the AVDTP stream transitions to the IDLE state before the timer fires, the A2DP stream is freed without the timer being cleared. This meant that when the timer fired, it tried to suspend a stream with a pointer that was previously freed and so segfaulted. This commit fixes that by ensuring that suspend_timer is cleared before freeing the A2DP stream. This was causing random segfaults when connecting my Sony WH-1000XM5 headphones. Commit: 61d3e447f9d47f03e5cbd55b805d7841ccc93319 https://github.com/bluez/bluez/commit/61d3e447f9d47f03e5cbd55b805d7841ccc93319 Author: Bastien Nocera [off-list ref] Date: 2025-09-18 (Thu, 18 Sep 2025) Changed paths: M profiles/audio/transport.c Log Message: ----------- transport: Fix build with A2DP support disabled $ ./bootstrap-configure --disable-a2dp && make [...] profiles/audio/transport.c: In function ‘media_transport_update_delay’: profiles/audio/transport.c:2653:33: error: implicit declaration of function ‘a2dp_avdtp_get’ [-Wimplicit-function-declaration] 2653 | a2dp->session = a2dp_avdtp_get(transport->device); | ^~~~~~~~~~~~~~ profiles/audio/transport.c:2653:31: error: assignment to ‘struct avdtp *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 2653 | a2dp->session = a2dp_avdtp_get(transport->device); | ^ Reported-by: Arun Raghavan <redacted> Fixes: 0bb66d3d1abd ("transport: fix A2DP Delay values missing from DBus") Compare: https://github.com/bluez/bluez/compare/c6dcf6b71450...61d3e447f9d4 To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications