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
7a0a53fc
Commit
7a0a53fc
authored
Nov 06, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mono: setup filter_t only when successful
parent
ce716153
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
17 deletions
+13
-17
modules/audio_filter/channel_mixer/mono.c
modules/audio_filter/channel_mixer/mono.c
+13
-17
No files found.
modules/audio_filter/channel_mixer/mono.c
View file @
7a0a53fc
...
...
@@ -368,23 +368,6 @@ static int OpenFilter( vlc_object_t *p_this )
p_sys
->
i_channel_selected
=
(
unsigned
int
)
var_CreateGetInteger
(
p_this
,
MONO_CFG
"channel"
);
if
(
p_sys
->
b_downmix
)
{
msg_Dbg
(
p_this
,
"using stereo to mono downmix"
);
p_filter
->
fmt_out
.
audio
.
i_physical_channels
=
AOUT_CHAN_CENTER
;
p_filter
->
fmt_out
.
audio
.
i_channels
=
1
;
}
else
{
msg_Dbg
(
p_this
,
"using pseudo mono"
);
p_filter
->
fmt_out
.
audio
.
i_physical_channels
=
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
);
p_filter
->
fmt_out
.
audio
.
i_channels
=
2
;
}
p_filter
->
fmt_out
.
audio
.
i_rate
=
p_filter
->
fmt_in
.
audio
.
i_rate
;
p_filter
->
fmt_out
.
audio
.
i_format
=
p_filter
->
fmt_out
.
i_codec
;
p_sys
->
i_nb_channels
=
aout_FormatNbChannels
(
&
(
p_filter
->
fmt_in
.
audio
)
);
p_sys
->
i_bitspersample
=
p_filter
->
fmt_out
.
audio
.
i_bitspersample
;
...
...
@@ -404,6 +387,19 @@ static int OpenFilter( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
if
(
p_sys
->
b_downmix
)
{
msg_Dbg
(
p_this
,
"using stereo to mono downmix"
);
p_filter
->
fmt_out
.
audio
.
i_physical_channels
=
AOUT_CHAN_CENTER
;
p_filter
->
fmt_out
.
audio
.
i_channels
=
1
;
}
else
{
msg_Dbg
(
p_this
,
"using pseudo mono"
);
p_filter
->
fmt_out
.
audio
.
i_physical_channels
=
AOUT_CHANS_STEREO
;
p_filter
->
fmt_out
.
audio
.
i_channels
=
2
;
}
p_filter
->
fmt_out
.
audio
.
i_rate
=
p_filter
->
fmt_in
.
audio
.
i_rate
;
p_filter
->
pf_audio_filter
=
Convert
;
msg_Dbg
(
p_this
,
"%4.4s->%4.4s, channels %d->%d, bits per sample: %i->%i"
,
...
...
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