audiohal: Fix stream gc runner thread. [1/1]
PD#TV-27905
Problem:
The garbage collection thread running flag is
not initialized, causing the thread exits and
not functional.
Solution:
Add initialization of the thread running flag.
Verify:
Verified with Firebolt build on AB301.
Change-Id: I8bd418a5779ee0ba070185286192af405425bc58
Signed-off-by: Tim Yao <tim.yao@amlogic.com>
diff --git a/src/audio_server.cpp b/src/audio_server.cpp
index f41fff8..cfc36bf 100644
--- a/src/audio_server.cpp
+++ b/src/audio_server.cpp
@@ -82,6 +82,7 @@
public:
explicit AudioServiceImpl()
: shm_(audio_server_shmem::getInstance(true)),
+ gc_runner_stop_(false),
gc_runner_(std::thread([this] {
while (!gc_runner_stop_) {
streamout_gc_();