Disable popping from audio buffer when streaming is activated 99/258199/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 11 May 2021 07:42:21 +0000 (16:42 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 12 May 2021 06:21:12 +0000 (15:21 +0900)
commitf80c126a0b58673a44f485a3b9b30eeacb34e20e
tree01b8037507651155574f9f3f430b32a47cc32665
parent010796f0b7c012a4908a7c4beaf7c973f8a56820
Disable popping from audio buffer when streaming is activated

Streaming thread reads content of audio buffer, so when the
streaming thread is joinable, modifying the buffer itself
can invalidate iterators associated with the buffer container,
which might cause an undefined behavior. For this reason,
limiting the maximum size of the buffer by popping from it
should be disabled when streaming thread is joinable.

Change-Id: I7cea5460cda6abdbee770c6b2818861a35f0080b
plugins/wakeup-manager/src/wakeup_audio_manager.cpp