Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
fb9840f1
Commit
fb9840f1
authored
May 04, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/shout: call shout_shutdown() in destructor
parent
492aaa33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
ShoutOutputPlugin.cxx
src/output/plugins/ShoutOutputPlugin.cxx
+18
-16
No files found.
src/output/plugins/ShoutOutputPlugin.cxx
View file @
fb9840f1
...
...
@@ -58,12 +58,7 @@ struct ShoutOutput final {
shout_conn
(
shout_new
()),
shout_meta
(
shout_metadata_new
())
{}
~
ShoutOutput
()
{
if
(
shout_meta
!=
nullptr
)
shout_metadata_free
(
shout_meta
);
if
(
shout_conn
!=
nullptr
)
shout_free
(
shout_conn
);
}
~
ShoutOutput
();
bool
Initialize
(
const
ConfigBlock
&
block
,
Error
&
error
)
{
return
base
.
Configure
(
block
,
error
);
...
...
@@ -76,6 +71,18 @@ static int shout_init_count;
static
constexpr
Domain
shout_output_domain
(
"shout_output"
);
ShoutOutput
::~
ShoutOutput
()
{
if
(
shout_meta
!=
nullptr
)
shout_metadata_free
(
shout_meta
);
if
(
shout_conn
!=
nullptr
)
shout_free
(
shout_conn
);
shout_init_count
--
;
if
(
shout_init_count
==
0
)
shout_shutdown
();
}
static
const
EncoderPlugin
*
shout_encoder_plugin_get
(
const
char
*
name
)
{
...
...
@@ -271,6 +278,11 @@ ShoutOutput::Configure(const ConfigBlock &block, Error &error)
static
AudioOutput
*
my_shout_init_driver
(
const
ConfigBlock
&
block
,
Error
&
error
)
{
if
(
shout_init_count
==
0
)
shout_init
();
shout_init_count
++
;
ShoutOutput
*
sd
=
new
ShoutOutput
();
if
(
!
sd
->
Initialize
(
block
,
error
))
{
delete
sd
;
...
...
@@ -282,11 +294,6 @@ my_shout_init_driver(const ConfigBlock &block, Error &error)
return
nullptr
;
}
if
(
shout_init_count
==
0
)
shout_init
();
shout_init_count
++
;
return
&
sd
->
base
;
}
...
...
@@ -362,11 +369,6 @@ my_shout_finish_driver(AudioOutput *ao)
sd
->
encoder
->
Dispose
();
delete
sd
;
shout_init_count
--
;
if
(
shout_init_count
==
0
)
shout_shutdown
();
}
static
void
...
...
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