diff options
author | nox <nox@FreeBSD.org> | 2012-11-18 04:26:58 +0800 |
---|---|---|
committer | nox <nox@FreeBSD.org> | 2012-11-18 04:26:58 +0800 |
commit | 0dc29282e92835ce58056db5dbbd16c2ac729790 (patch) | |
tree | d8f288562a657afbe46e894ee47bcc94d97e2eea | |
parent | 11a02b54222cd12fc5e4de4d4507bc058f1905e1 (diff) | |
download | freebsd-ports-gnome-0dc29282e92835ce58056db5dbbd16c2ac729790.tar.gz freebsd-ports-gnome-0dc29282e92835ce58056db5dbbd16c2ac729790.tar.zst freebsd-ports-gnome-0dc29282e92835ce58056db5dbbd16c2ac729790.zip |
- Fix pulseaudio segfault. [1]
- No PORTREVISION bump as PULSEAUDIO isn't a default option.
Reported by: Rainer Hurling <rhurlin@gwdg.de> on -multimedia [1]
Feature safe: yes
-rw-r--r-- | multimedia/vlc/files/patch-modules-audio_output-vlcpulse.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/multimedia/vlc/files/patch-modules-audio_output-vlcpulse.c b/multimedia/vlc/files/patch-modules-audio_output-vlcpulse.c new file mode 100644 index 000000000000..505438bfa1f0 --- /dev/null +++ b/multimedia/vlc/files/patch-modules-audio_output-vlcpulse.c @@ -0,0 +1,32 @@ +--- modules/audio_output/vlcpulse.c.orig ++++ modules/audio_output/vlcpulse.c +@@ -113,10 +113,12 @@ pa_context *vlc_pa_connect (vlc_object_t + 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); ++ if (getpwuid_r (getuid (), &pwbuf, buf, sizeof (buf), &pw) == 0) { ++ if (pw != NULL) ++ pa_proplist_sets (props, PA_PROP_APPLICATION_PROCESS_USER, ++ pw->pw_name); ++ break; ++ } + } + + for (size_t max = sysconf (_SC_HOST_NAME_MAX), len = max % 1024 + 1024; +@@ -124,9 +126,11 @@ pa_context *vlc_pa_connect (vlc_object_t + { + char hostname[len]; + +- if (gethostname (hostname, sizeof (hostname)) == 0) ++ if (gethostname (hostname, sizeof (hostname)) == 0) { + pa_proplist_sets (props, PA_PROP_APPLICATION_PROCESS_HOST, + hostname); ++ break; ++ } + } + + const char *session = getenv ("XDG_SESSION_COOKIE"); |