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
b411b318
Commit
b411b318
authored
Apr 09, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: device description may be NULL
parent
5637ca81
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+9
-6
No files found.
modules/audio_output/alsa.c
View file @
b411b318
...
...
@@ -942,13 +942,14 @@ static void GetDevices (vlc_object_t *obj, module_config_t *item)
{
void
*
hint
=
hints
[
i
];
char
*
name
=
snd_device_name_get_hint
(
hint
,
"NAME"
);
char
*
desc
=
snd_device_name_get_hint
(
hint
,
"DESC"
);
if
(
unlikely
(
name
==
NULL
))
continue
;
char
*
desc
=
snd_device_name_get_hint
(
hint
,
"DESC"
);
if
(
desc
!=
NULL
)
for
(
char
*
lf
=
strchr
(
desc
,
'\n'
);
lf
;
lf
=
strchr
(
lf
,
'\n'
))
*
lf
=
' '
;
if
(
likely
(
desc
!=
NULL
&&
name
!=
NULL
))
msg_Dbg
(
obj
,
" %s (%s)"
,
desc
,
name
);
msg_Dbg
(
obj
,
" %s (%s)"
,
(
desc
!=
NULL
)
?
desc
:
name
,
name
);
if
(
item
!=
NULL
)
{
...
...
@@ -957,6 +958,8 @@ static void GetDevices (vlc_object_t *obj, module_config_t *item)
item
->
ppsz_list_text
=
xrealloc
(
item
->
ppsz_list_text
,
(
item
->
i_list
+
2
)
*
sizeof
(
char
*
));
item
->
ppsz_list
[
item
->
i_list
]
=
name
;
if
(
desc
==
NULL
)
desc
=
strdup
(
name
);
item
->
ppsz_list_text
[
item
->
i_list
]
=
desc
;
item
->
i_list
++
;
}
...
...
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