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
feaf4a94
Commit
feaf4a94
authored
Aug 28, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: remove dead initialization and factorize.
parent
f2287d10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
17 deletions
+9
-17
src/control/audio.c
src/control/audio.c
+9
-17
No files found.
src/control/audio.c
View file @
feaf4a94
...
...
@@ -150,7 +150,7 @@ VLC_PUBLIC_API int libvlc_audio_output_set( libvlc_instance_t *p_instance,
int
libvlc_audio_output_device_count
(
libvlc_instance_t
*
p_instance
,
const
char
*
psz_audio_output
)
{
char
*
psz_config_name
=
NULL
;
char
*
psz_config_name
;
if
(
!
psz_audio_output
)
return
0
;
if
(
asprintf
(
&
psz_config_name
,
"%s-audio-device"
,
psz_audio_output
)
==
-
1
)
...
...
@@ -171,10 +171,8 @@ int libvlc_audio_output_device_count( libvlc_instance_t *p_instance,
return
p_module_config
->
i_list
;
}
else
free
(
psz_config_name
);
free
(
psz_config_name
);
return
0
;
}
...
...
@@ -185,7 +183,7 @@ char * libvlc_audio_output_device_longname( libvlc_instance_t *p_instance,
const
char
*
psz_audio_output
,
int
i_device
)
{
char
*
psz_config_name
=
NULL
;
char
*
psz_config_name
;
if
(
!
psz_audio_output
)
return
NULL
;
if
(
asprintf
(
&
psz_config_name
,
"%s-audio-device"
,
psz_audio_output
)
==
-
1
)
...
...
@@ -216,9 +214,8 @@ char * libvlc_audio_output_device_longname( libvlc_instance_t *p_instance,
return
strdup
(
p_module_config
->
ppsz_list
[
i_device
]
);
}
}
else
free
(
psz_config_name
);
free
(
psz_config_name
);
return
NULL
;
}
...
...
@@ -229,7 +226,7 @@ char * libvlc_audio_output_device_id( libvlc_instance_t *p_instance,
const
char
*
psz_audio_output
,
int
i_device
)
{
char
*
psz_config_name
=
NULL
;
char
*
psz_config_name
;
if
(
!
psz_audio_output
)
return
NULL
;
if
(
asprintf
(
&
psz_config_name
,
"%s-audio-device"
,
psz_audio_output
)
==
-
1
)
...
...
@@ -256,9 +253,8 @@ char * libvlc_audio_output_device_id( libvlc_instance_t *p_instance,
return
strdup
(
p_module_config
->
ppsz_list
[
i_device
]
);
}
else
free
(
psz_config_name
);
free
(
psz_config_name
);
return
NULL
;
}
...
...
@@ -287,11 +283,9 @@ int libvlc_audio_output_get_device_type( libvlc_instance_t *p_instance,
aout_instance_t
*
p_aout
=
GetAOut
(
p_instance
,
p_e
);
if
(
p_aout
)
{
vlc_value_t
val
;
var_Get
(
p_aout
,
"audio-device"
,
&
val
);
int
i_device_type
=
var_GetInteger
(
p_aout
,
"audio-device"
);
vlc_object_release
(
p_aout
);
return
val
.
i_int
;
return
i_device_type
;
}
libvlc_exception_raise
(
p_e
,
"Unable to get audio output"
);
return
libvlc_AudioOutputDevice_Error
;
...
...
@@ -500,11 +494,9 @@ void libvlc_audio_set_channel( libvlc_instance_t *p_instance,
if
(
p_aout
)
{
vlc_value_t
val
;
int
i_ret
=
-
1
;
val
.
i_int
=
channel
;
i_ret
=
var_Set
(
p_aout
,
"audio-channels"
,
val
);
if
(
i_ret
<
0
)
if
(
var_Set
(
p_aout
,
"audio-channels"
,
val
)
<
0
)
libvlc_exception_raise
(
p_e
,
"Failed setting audio channel"
);
vlc_object_release
(
p_aout
);
...
...
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