diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2020-06-23 09:23:28 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2020-06-23 09:33:48 +0900 |
commit | 8a6f4c8281f17f1daff33c997d6e6fb36de977e4 (patch) | |
tree | 67b126ea0b199aebd4916f88082ed0602f120fd2 | |
parent | 90113d4a6fa096b45e7c8ae46270c3015b9738d0 (diff) | |
download | media-key-8a6f4c8281f17f1daff33c997d6e6fb36de977e4.tar.gz media-key-8a6f4c8281f17f1daff33c997d6e6fb36de977e4.tar.bz2 media-key-8a6f4c8281f17f1daff33c997d6e6fb36de977e4.zip |
Lock the mutex in the callback functions
Change-Id: I13be0e6d75a0e768e2fd37bd0b090f4e665fb42a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | src/media_key.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/media_key.cc b/src/media_key.cc index 5a5763d..ce30c0c 100644 --- a/src/media_key.cc +++ b/src/media_key.cc @@ -172,6 +172,7 @@ class MediaKey { } auto* handle = static_cast<MediaKey*>(data); + std::lock_guard<std::recursive_mutex> lock(handle->GetMutex()); if (handle->cb_ == nullptr) return ECORE_CALLBACK_RENEW; @@ -191,6 +192,7 @@ class MediaKey { } auto* handle = static_cast<MediaKey*>(data); + std::lock_guard<std::recursive_mutex> lock(handle->GetMutex()); if (handle->cb_ == nullptr) return ECORE_CALLBACK_RENEW; |