Date: Sat, 17 Nov 2012 17:40:27 +0100 From: Juergen Lock <nox@jelal.kn-bremen.de> To: Rainer Hurling <rhurlin@gwdg.de> Cc: freebsd-multimedia@freebsd.org, Juergen Lock <nox@jelal.kn-bremen.de> Subject: Re: VLC 2.0.4 audio output module Pulseaudio seg faults Message-ID: <20121117164027.GA74542@triton8.kn-bremen.de> In-Reply-To: <50A783EC.3080801@gwdg.de> References: <50A783EC.3080801@gwdg.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 17, 2012 at 01:32:44PM +0100, Rainer Hurling wrote: > While vlc versions up to 2.0.3 runs fine using pulseaudio output module, > unfortunately version 2.0.4 immediately seg faults. > > When I change from pulseaudio output to any other audio output module > vlc does not crash. > > Is this a know issue? Are there any workarounds? I really need > pulseaudio for my sound system. > > My box is running on latest 10.0-CURRENT amd64. Please let me know if I > should provide more information. > Whoops that is a funny bug. Does the patch below fix it? (put it in files/patch-modules-audio_output-vlcpulse.c ) Thanx! Juergen --- 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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121117164027.GA74542>