Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
e23414c5
Commit
e23414c5
authored
4 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
opensl: lock mutex in AudioPlayer::stop
Change-Id: I618ae6f9ae849832e7704150b72f3c9ff3ba2cf4
parent
62e29720
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/media/audio/opensl/audio_player.cpp
+3
-0
3 additions, 0 deletions
src/media/audio/opensl/audio_player.cpp
with
3 additions
and
0 deletions
src/media/audio/opensl/audio_player.cpp
+
3
−
0
View file @
e23414c5
...
...
@@ -170,6 +170,7 @@ AudioPlayer::AudioPlayer(jami::AudioFormat sampleFormat,
AudioPlayer
::~
AudioPlayer
()
{
JAMI_DBG
(
"Destroying OpenSL playback stream"
);
std
::
lock_guard
<
std
::
mutex
>
lk
(
m_
);
// destroy buffer queue audio player object, and invalidate all associated interfaces
if
(
playerObjectItf_
)
{
...
...
@@ -192,6 +193,7 @@ AudioPlayer::setBufQueue(AudioQueue* playQ, AudioQueue* freeQ)
bool
AudioPlayer
::
start
()
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
m_
);
JAMI_DBG
(
"OpenSL playback start"
);
SLuint32
state
;
SLresult
result
=
(
*
playItf_
)
->
GetPlayState
(
playItf_
,
&
state
);
...
...
@@ -227,6 +229,7 @@ void
AudioPlayer
::
stop
()
{
JAMI_DBG
(
"OpenSL playback stop"
);
std
::
lock_guard
<
std
::
mutex
>
lk
(
m_
);
SLuint32
state
;
SLresult
result
=
(
*
playItf_
)
->
GetPlayState
(
playItf_
,
&
state
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment