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
6f1bad2a
Commit
6f1bad2a
authored
Aug 13, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PulseAudio: do not assume sysconf() returns a finite value
(Here -1 means infinity.) (cherry picked from commit
191f0716
)
parent
a8377747
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
modules/audio_output/vlcpulse.c
modules/audio_output/vlcpulse.c
+21
-12
No files found.
modules/audio_output/vlcpulse.c
View file @
6f1bad2a
...
...
@@ -107,18 +107,27 @@ pa_context *vlc_pa_connect (vlc_object_t *obj, pa_threaded_mainloop **mlp)
//pa_proplist_sets (props, PA_PROP_APPLICATION_PROCESS_BINARY,
// PACKAGE_NAME);
char
buf
[
sysconf
(
_SC_GETPW_R_SIZE_MAX
)];
struct
passwd
pwbuf
,
*
pw
;
if
(
getpwuid_r
(
getuid
(),
&
pwbuf
,
buf
,
sizeof
(
buf
),
&
pw
)
==
0
&&
pw
!=
NULL
)
pa_proplist_sets
(
props
,
PA_PROP_APPLICATION_PROCESS_USER
,
pw
->
pw_name
);
char
hostname
[
sysconf
(
_SC_HOST_NAME_MAX
)];
if
(
gethostname
(
hostname
,
sizeof
(
hostname
))
==
0
)
pa_proplist_sets
(
props
,
PA_PROP_APPLICATION_PROCESS_HOST
,
hostname
);
for
(
size_t
max
=
sysconf
(
_SC_GETPW_R_SIZE_MAX
),
len
=
max
%
1024
+
1024
;
len
<
max
;
len
+=
1024
)
{
struct
passwd
pwbuf
,
*
pw
;
char
buf
[
len
];
if
(
getpwuid_r
(
getuid
(),
&
pwbuf
,
buf
,
sizeof
(
buf
),
&
pw
)
==
0
&&
pw
!=
NULL
)
pa_proplist_sets
(
props
,
PA_PROP_APPLICATION_PROCESS_USER
,
pw
->
pw_name
);
}
for
(
size_t
max
=
sysconf
(
_SC_HOST_NAME_MAX
),
len
=
max
%
1024
+
1024
;
len
<
max
;
len
+=
1024
)
{
char
hostname
[
len
];
if
(
gethostname
(
hostname
,
sizeof
(
hostname
))
==
0
)
pa_proplist_sets
(
props
,
PA_PROP_APPLICATION_PROCESS_HOST
,
hostname
);
}
const
char
*
session
=
getenv
(
"XDG_SESSION_COOKIE"
);
if
(
session
!=
NULL
)
...
...
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