Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
5f65c5c9
Commit
5f65c5c9
authored
Jul 24, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to check for the existence of the variable to destroy it.
Destroying directly saves one Lookup.
parent
9a61ec48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
20 deletions
+5
-20
src/audio_output/dec.c
src/audio_output/dec.c
+2
-8
src/audio_output/intf.c
src/audio_output/intf.c
+3
-12
No files found.
src/audio_output/dec.c
View file @
5f65c5c9
...
...
@@ -231,14 +231,8 @@ int aout_DecDelete( aout_instance_t * p_aout, aout_input_t * p_input )
{
aout_OutputDelete
(
p_aout
);
aout_MixerDelete
(
p_aout
);
if
(
var_Type
(
p_aout
,
"audio-device"
)
!=
0
)
{
var_Destroy
(
p_aout
,
"audio-device"
);
}
if
(
var_Type
(
p_aout
,
"audio-channels"
)
!=
0
)
{
var_Destroy
(
p_aout
,
"audio-channels"
);
}
var_Destroy
(
p_aout
,
"audio-device"
);
var_Destroy
(
p_aout
,
"audio-channels"
);
}
aout_unlock_mixer
(
p_aout
);
...
...
src/audio_output/intf.c
View file @
5f65c5c9
...
...
@@ -440,14 +440,8 @@ int aout_FindAndRestart( vlc_object_t * p_this, const char *psz_name,
(
void
)
psz_name
;
(
void
)
oldval
;
(
void
)
newval
;
(
void
)
p_data
;
if
(
p_aout
==
NULL
)
return
VLC_SUCCESS
;
if
(
var_Type
(
p_aout
,
"audio-device"
)
!=
0
)
{
var_Destroy
(
p_aout
,
"audio-device"
);
}
if
(
var_Type
(
p_aout
,
"audio-channels"
)
!=
0
)
{
var_Destroy
(
p_aout
,
"audio-channels"
);
}
var_Destroy
(
p_aout
,
"audio-device"
);
var_Destroy
(
p_aout
,
"audio-channels"
);
aout_Restart
(
p_aout
);
vlc_object_release
(
p_aout
);
...
...
@@ -469,10 +463,7 @@ int aout_ChannelsRestart( vlc_object_t * p_this, const char * psz_variable,
{
/* This is supposed to be a significant change and supposes
* rebuilding the channel choices. */
if
(
var_Type
(
p_aout
,
"audio-channels"
)
>=
0
)
{
var_Destroy
(
p_aout
,
"audio-channels"
);
}
var_Destroy
(
p_aout
,
"audio-channels"
);
}
aout_Restart
(
p_aout
);
return
0
;
...
...
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