Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
5ceac2ed
Commit
5ceac2ed
authored
Jun 08, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opensles: fix mismatch object lifecycle between open/close and start/stop
Refs: #8579
parent
a62d119a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
modules/audio_output/opensles_android.c
modules/audio_output/opensles_android.c
+14
-13
No files found.
modules/audio_output/opensles_android.c
View file @
5ceac2ed
...
@@ -352,16 +352,6 @@ static void PlayedCallback (SLAndroidSimpleBufferQueueItf caller, void *pContext
...
@@ -352,16 +352,6 @@ static void PlayedCallback (SLAndroidSimpleBufferQueueItf caller, void *pContext
/*****************************************************************************
/*****************************************************************************
*
*
*****************************************************************************/
*****************************************************************************/
static
void
Clean
(
aout_sys_t
*
sys
)
{
if
(
sys
->
playerObject
)
Destroy
(
sys
->
playerObject
);
if
(
sys
->
outputMixObject
)
Destroy
(
sys
->
outputMixObject
);
if
(
sys
->
engineObject
)
Destroy
(
sys
->
engineObject
);
}
static
int
Start
(
audio_output_t
*
aout
,
audio_sample_format_t
*
restrict
fmt
)
static
int
Start
(
audio_output_t
*
aout
,
audio_sample_format_t
*
restrict
fmt
)
{
{
SLresult
result
;
SLresult
result
;
...
@@ -446,7 +436,11 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
...
@@ -446,7 +436,11 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
error:
error:
Clean
(
sys
);
if
(
sys
->
playerObject
)
{
Destroy
(
sys
->
playerObject
);
sys
->
playerObject
=
NULL
;
}
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -460,6 +454,9 @@ static void Stop(audio_output_t *aout)
...
@@ -460,6 +454,9 @@ static void Stop(audio_output_t *aout)
free
(
sys
->
buf
);
free
(
sys
->
buf
);
block_ChainRelease
(
sys
->
p_buffer_chain
);
block_ChainRelease
(
sys
->
p_buffer_chain
);
Destroy
(
sys
->
playerObject
);
sys
->
playerObject
=
NULL
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -470,7 +467,8 @@ static void Close(vlc_object_t *obj)
...
@@ -470,7 +467,8 @@ static void Close(vlc_object_t *obj)
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
aout_sys_t
*
sys
=
aout
->
sys
;
aout_sys_t
*
sys
=
aout
->
sys
;
Clean
(
sys
);
Destroy
(
sys
->
outputMixObject
);
Destroy
(
sys
->
engineObject
);
dlclose
(
sys
->
p_so_handle
);
dlclose
(
sys
->
p_so_handle
);
vlc_mutex_destroy
(
&
sys
->
lock
);
vlc_mutex_destroy
(
&
sys
->
lock
);
free
(
sys
);
free
(
sys
);
...
@@ -553,7 +551,10 @@ static int Open (vlc_object_t *obj)
...
@@ -553,7 +551,10 @@ static int Open (vlc_object_t *obj)
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
error:
error:
Clean
(
sys
);
if
(
sys
->
outputMixObject
)
Destroy
(
sys
->
outputMixObject
);
if
(
sys
->
engineObject
)
Destroy
(
sys
->
engineObject
);
if
(
sys
->
p_so_handle
)
if
(
sys
->
p_so_handle
)
dlclose
(
sys
->
p_so_handle
);
dlclose
(
sys
->
p_so_handle
);
free
(
sys
);
free
(
sys
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment