Merge "SoundPool: Update queue only if streamID matches"

This commit is contained in:
Andy Hung
2021-12-10 18:35:06 +00:00
committed by Gerrit Code Review

View File

@@ -185,7 +185,7 @@ void SoundPool::stop(int32_t streamID)
auto apiLock = kUseApiLock ? std::make_unique<std::lock_guard<std::mutex>>(mApiLock) : nullptr; auto apiLock = kUseApiLock ? std::make_unique<std::lock_guard<std::mutex>>(mApiLock) : nullptr;
soundpool::Stream* stream = mStreamManager.findStream(streamID); soundpool::Stream* stream = mStreamManager.findStream(streamID);
if (stream != nullptr && stream->requestStop(streamID)) { if (stream != nullptr && stream->requestStop(streamID)) {
mStreamManager.moveToRestartQueue(stream); mStreamManager.moveToRestartQueue(stream, streamID);
} }
} }