Bug 202588 - multimedia/mpv OSS+CFLAGS = crash on i386
Summary: multimedia/mpv OSS+CFLAGS = crash on i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Some People
Assignee: Carlos J. Puga Medina
URL:
Keywords: easy, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2015-08-23 10:04 UTC by sasamotikomi
Modified: 2016-04-15 18:37 UTC (History)
4 users (show)

See Also:
cjpm: maintainer-feedback+


Attachments
Patch (971 bytes, patch)
2015-08-23 21:12 UTC, Carlos J Puga Medina
no flags Details | Diff
patch mpv add sdl2 support and remove temporal fix on x86 (1.17 KB, patch)
2016-03-22 04:38 UTC, Carlos J. Puga Medina
cpm: maintainer-approval+
Details | Diff
patch mpv add sdl2 support and remove temporal fix on x86 (1.21 KB, patch)
2016-03-23 16:21 UTC, Carlos J. Puga Medina
cpm: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sasamotikomi 2015-08-23 10:04:44 UTC
Mpv crash if CFLAGS is used on i386:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198758#c29
Comment 1 Carlos J Puga Medina 2015-08-23 10:36:57 UTC
Check if mpv works after deleting from Makefile

.if ${ARCH} == "i386"
CFLAGS:=        ${CFLAGS:N-O*} -O0
.endif
Comment 2 sasamotikomi 2015-08-23 12:02:48 UTC
(In reply to Carlos J Puga Medina from comment #1)
Creating non-video VO window.
connect(2) call to /tmp/jack-1001/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
[ao/jack] cannot open server
[ao] Failed to initialize audio driver 'jack'
AO: [oss] 44100Hz stereo 2ch s16
Segmentation fault
With few CFLAGS same and jack doesn't work for some strange reason  "/tmp/jack-1001/default/jack_0 " I don't know why jack try use it directory.
Comment 3 Carlos J Puga Medina 2015-08-23 21:12:25 UTC
Created attachment 160266 [details]
Patch

This patch adds ALSA option helper to mpv.

Build mpv with ALSA and JACK options active.
Comment 4 sasamotikomi 2015-08-28 16:30:02 UTC
(In reply to Carlos J Puga Medina from comment #3)

$ mpv -ao alsa something.mp3
AO: [alsa] 44100Hz stereo 2ch s16
Segmentation fault (core dumped)

$ mpv -ao pulse something.mp3
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
AO: [pulse] 44100Hz stereo 2ch s16
Segmentation fault (core dumped)

$ mpv -ao jack something.mp3
Creating non-video VO window.
connect(2) call to /tmp/jack-1001/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
[ao/jack] cannot open server
[ao] Failed to initialize audio driver 'jack'
Could not open/initialize audio device -> no sound.
Audio: no audio
Comment 5 Carlos J Puga Medina 2015-08-28 17:57:45 UTC
(In reply to sasamotikomi from comment #4)

Can you show me the following output? Please, be sure that you have ALSA, JACK and PULSE options enabled.

% make -C /usr/ports/multimedia/mpv configure
Comment 6 Carlos J Puga Medina 2015-10-20 16:10:24 UTC
sasamotikomi, did you reproduced this issue with the new Mpv releases? can we close this PR?
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2015-10-21 02:55:06 UTC
@Carlos, I've assigned the issue to you. Please triage the issue as best you can (keywords, other fields), and then close it with the most appropriate resolution if you decide that is what's needed.
Comment 8 Carlos J Puga Medina 2015-10-21 17:11:44 UTC
Thanks, @Kubilay.
Comment 9 sasamotikomi 2016-03-08 18:58:49 UTC
(In reply to Carlos J Puga Medina from comment #6)
mpv 0.16.0 problem fixed:
Build and work fine without fix:      
${CFLAGS:N-O*} -O0
And with CFLAGS too:
CFLAGS+= -o3 -msse -mmmx -m3dnow
So better remove patch and add CFLAGS auto-detect from SDL20:
https://svnweb.freebsd.org/ports/head/devel/sdl20/Makefile?view=markup
Comment 10 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-03-09 01:55:54 UTC
(In reply to sasamotikomi from comment #9)

OK, let me do some testing.

Thanks for reporting!
Comment 11 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-03-22 04:38:37 UTC
Created attachment 168472 [details]
patch mpv add sdl2 support and remove temporal fix on x86
Comment 12 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-03-23 16:21:39 UTC
Created attachment 168541 [details]
patch mpv add sdl2 support and remove temporal fix on x86

Minor fix in port options.