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
c61a889c
Commit
c61a889c
authored
Sep 17, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/roar: use GLib memory allocation functions
GLib has a built-in OOM handler.
parent
567fe89a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
roar_output_plugin.c
src/output/roar_output_plugin.c
+3
-11
No files found.
src/output/roar_output_plugin.c
View file @
c61a889c
...
@@ -107,16 +107,8 @@ roar_init(G_GNUC_UNUSED const struct audio_format *audio_format,
...
@@ -107,16 +107,8 @@ roar_init(G_GNUC_UNUSED const struct audio_format *audio_format,
const
struct
config_param
*
param
,
const
struct
config_param
*
param
,
G_GNUC_UNUSED
GError
**
error
)
G_GNUC_UNUSED
GError
**
error
)
{
{
GMutex
*
lock
=
g_mutex_new
();
struct
roar
*
self
=
g_new0
(
struct
roar
,
1
);
self
->
lock
=
g_mutex_new
();
roar_t
*
self
=
roar_mm_calloc
(
1
,
sizeof
(
*
self
));
if
(
self
==
NULL
)
{
g_set_error
(
error
,
roar_output_quark
(),
0
,
"Failed to allocate memory"
);
return
NULL
;
}
self
->
lock
=
lock
;
self
->
err
=
ROAR_ERROR_NONE
;
self
->
err
=
ROAR_ERROR_NONE
;
roar_configure
(
self
,
param
);
roar_configure
(
self
,
param
);
return
self
;
return
self
;
...
@@ -131,7 +123,7 @@ roar_finish(void *data)
...
@@ -131,7 +123,7 @@ roar_finish(void *data)
g_free
(
self
->
name
);
g_free
(
self
->
name
);
g_mutex_free
(
self
->
lock
);
g_mutex_free
(
self
->
lock
);
roar_mm_free
(
data
);
g_free
(
self
);
}
}
static
bool
static
bool
...
...
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