Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 549680

Summary: media-video/mplayer-1.2_pre20150214 pa_stream_write() failed: Invalid argument with >=media-sound/pulseaudio-6.0
Product: Gentoo Linux Reporter: Matthew Stapleton <matthew4196>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal CC: gnome, matthew4196, sound
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://trac.mplayerhq.hu/ticket/2241
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: fix_unaligned_frames_to_pa_stream_write.patch

Description Matthew Stapleton 2015-05-17 04:27:28 UTC
Since pulseaudio commit: https://github.com/pulseaudio/pulseaudio/commit/150ace90f3808bbb7240e18a11140d66a7bda146 (stream: Fail on client submitting non-frame-aligned memblocks) (applied to Pulseaudio release: 6.0), mplayer sometimes gets pa_stream_write() failed: Invalid argument when sending audio to pulseaudio.  When playing with 6 channels, I always get the error.  This is because mplayer doesn't align the audio output to the current frame size when sending audio to pulseaudio.  There is also a bug report here: https://bugs.archlinux.org/task/44937 .

I have created a patch based on how mplayer's alsa driver aligns the frames which appears to fix the problem.

Reproducible: Always
Comment 1 Matthew Stapleton 2015-05-17 04:29:45 UTC
Created attachment 403444 [details, diff]
fix_unaligned_frames_to_pa_stream_write.patch
Comment 2 Pacho Ramos gentoo-dev 2015-05-21 15:45:16 UTC
Did you forwarded the patch to upstream? Thanks!
Comment 3 Matthew Stapleton 2015-05-26 09:12:12 UTC
No.  Should I do that?  This patch may be needed to be back ported to stable versions of mplayer and/or improved as well before pulseaudio 6.0 is marked as stable in portage.
Comment 4 Pacho Ramos gentoo-dev 2015-05-26 20:58:10 UTC
yes please, forward it to upstream to not need to carry the patch forever
Comment 5 Pacho Ramos gentoo-dev 2015-06-13 11:08:22 UTC
+*mplayer-1.2_pre20150214-r1 (13 Jun 2015)
+
+  13 Jun 2015; Pacho Ramos <pacho@gentoo.org>
+  +files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch,
+  +mplayer-1.2_pre20150214-r1.ebuild:
+  Let it work with pulseaudio-6.0, bug #549680 by Matthew Stapleton
+