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
f5c2acf1
Commit
f5c2acf1
authored
Jul 06, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output_init: parse audio format earlier
parent
17e30543
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
output_init.c
src/output_init.c
+10
-12
No files found.
src/output_init.c
View file @
f5c2acf1
...
...
@@ -78,11 +78,11 @@ bool
audio_output_init
(
struct
audio_output
*
ao
,
const
struct
config_param
*
param
,
GError
**
error
)
{
const
char
*
format
;
const
struct
audio_output_plugin
*
plugin
=
NULL
;
if
(
param
)
{
const
char
*
type
=
NULL
;
const
char
*
format
;
type
=
config_get_block_string
(
param
,
AUDIO_OUTPUT_TYPE
,
NULL
);
if
(
type
==
NULL
)
{
...
...
@@ -109,6 +109,14 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
format
=
config_get_block_string
(
param
,
AUDIO_OUTPUT_FORMAT
,
NULL
);
ao
->
config_audio_format
=
format
!=
NULL
;
if
(
format
!=
NULL
)
{
bool
success
=
audio_format_parse
(
&
ao
->
out_audio_format
,
format
,
error
);
if
(
!
success
)
return
false
;
}
}
else
{
g_warning
(
"No
\"
%s
\"
defined in config file
\n
"
,
CONF_AUDIO_OUTPUT
);
...
...
@@ -121,7 +129,7 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
plugin
->
name
);
ao
->
name
=
"default detected output"
;
format
=
NULL
;
ao
->
config_audio_format
=
false
;
}
ao
->
plugin
=
plugin
;
...
...
@@ -139,16 +147,6 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
filter_chain_append
(
ao
->
filter
,
ao
->
convert_filter
);
ao
->
config_audio_format
=
format
!=
NULL
;
if
(
ao
->
config_audio_format
)
{
bool
ret
;
ret
=
audio_format_parse
(
&
ao
->
out_audio_format
,
format
,
error
);
if
(
!
ret
)
return
false
;
}
ao
->
thread
=
NULL
;
notify_init
(
&
ao
->
notify
);
ao
->
command
=
AO_COMMAND_NONE
;
...
...
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