Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
3e48cead
Commit
3e48cead
authored
May 23, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: balance stereo-mode variable create and destroy calls
parent
ddc97a84
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
+7
-12
src/audio_output/dec.c
src/audio_output/dec.c
+7
-2
src/audio_output/output.c
src/audio_output/output.c
+0
-10
No files found.
src/audio_output/dec.c
View file @
3e48cead
...
@@ -65,13 +65,17 @@ int aout_DecNew( audio_output_t *p_aout,
...
@@ -65,13 +65,17 @@ int aout_DecNew( audio_output_t *p_aout,
return
-
1
;
return
-
1
;
}
}
var_Create
(
p_aout
,
"stereo-mode"
,
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
|
VLC_VAR_DOINHERIT
);
vlc_value_t
txt
;
txt
.
psz_string
=
_
(
"Stereo audio mode"
);
var_Change
(
p_aout
,
"stereo-mode"
,
VLC_VAR_SETTEXT
,
&
txt
,
NULL
);
aout_owner_t
*
owner
=
aout_owner
(
p_aout
);
aout_owner_t
*
owner
=
aout_owner
(
p_aout
);
/* TODO: reduce lock scope depending on decoder's real need */
/* TODO: reduce lock scope depending on decoder's real need */
aout_OutputLock
(
p_aout
);
aout_OutputLock
(
p_aout
);
var_Destroy
(
p_aout
,
"stereo-mode"
);
/* Create the audio output stream */
/* Create the audio output stream */
owner
->
volume
=
aout_volume_New
(
p_aout
,
p_replay_gain
);
owner
->
volume
=
aout_volume_New
(
p_aout
,
p_replay_gain
);
...
@@ -93,6 +97,7 @@ int aout_DecNew( audio_output_t *p_aout,
...
@@ -93,6 +97,7 @@ int aout_DecNew( audio_output_t *p_aout,
error:
error:
aout_volume_Delete
(
owner
->
volume
);
aout_volume_Delete
(
owner
->
volume
);
aout_OutputUnlock
(
p_aout
);
aout_OutputUnlock
(
p_aout
);
var_Destroy
(
p_aout
,
"stereo-mode"
);
return
-
1
;
return
-
1
;
}
}
...
...
src/audio_output/output.c
View file @
3e48cead
...
@@ -376,16 +376,6 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt)
...
@@ -376,16 +376,6 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt)
return
-
1
;
return
-
1
;
}
}
if
(
!
var_Type
(
aout
,
"stereo-mode"
))
{
var_Create
(
aout
,
"stereo-mode"
,
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
|
VLC_VAR_DOINHERIT
);
vlc_value_t
txt
;
txt
.
psz_string
=
_
(
"Stereo audio mode"
);
var_Change
(
aout
,
"stereo-mode"
,
VLC_VAR_SETTEXT
,
&
txt
,
NULL
);
}
/* The user may have selected a different channels configuration. */
/* The user may have selected a different channels configuration. */
var_AddCallback
(
aout
,
"stereo-mode"
,
aout_ChannelsRestart
,
NULL
);
var_AddCallback
(
aout
,
"stereo-mode"
,
aout_ChannelsRestart
,
NULL
);
switch
(
var_GetInteger
(
aout
,
"stereo-mode"
))
switch
(
var_GetInteger
(
aout
,
"stereo-mode"
))
...
...
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