Opened 7 months ago

Closed 7 months ago

#69645 closed defect (fixed)

mpv @0.37.0: Seeking flac causes bus error

Reported by: Rivers47 (Rivers Chen) Owned by: Ionic (Mihai Moldovan)
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: sonoma arm64 Cc: i0ntempest
Port: mpv

Description (last modified by Rivers47 (Rivers Chen))

mpv cannot seek when playing a flac file. Normal playback is fine, but as soon as one seeks by pressing an arrow key, or clicking the progress bar in the pseudo gui the program crashes with "bus error". Other functionalities seems to be fine such as adjusting volume or playback speed.

Other audio formats I have tested (mp3, wav) are completely fine, video playback also seems to be fine. I have tested multiple flac files and they all behave the same.

I'm on Sonoma 14.4.1 and XCode 15.3 (15E204a).

Command used to test:

$ mpv --no-config --msg-level=all=trace test.flac

Attachments (2)

log.txt (69.7 KB) - added by Rivers47 (Rivers Chen) 7 months ago.
mpv-2024-04-01-164137.ips (71.1 KB) - added by Rivers47 (Rivers Chen) 7 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 months ago by Rivers47 (Rivers Chen)

Description: modified (diff)

Changed 7 months ago by Rivers47 (Rivers Chen)

Attachment: log.txt added

comment:2 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: i0ntempest added; i0ntempest@… openmaintainer removed
Owner: changed from ionic@… to Ionic

Please attach the crash log which macOS should have generated in ~/Library/Logs/DiagnosticReports.

Changed 7 months ago by Rivers47 (Rivers Chen)

Attachment: mpv-2024-04-01-164137.ips added

comment:3 Changed 7 months ago by i0ntempest

I was able to reproduce the crash, looks like a something related to libavformat from ffmpeg. Maybe open an issue upstream with these information so the developers can take a look at what's going on.

Also, seeking an flac from a network location will not trigger the crash. mpv 0.37 from https://laboratory.stolendata.net/~djinn/mpv_osx/ will not crash when seeking local flac files.

Last edited 7 months ago by i0ntempest (previous) (diff)

comment:4 Changed 7 months ago by Rivers47 (Rivers Chen)

I just realized macport's ffmpeg version is quite old (4.4.4, last updated 10 months ago). And ffmpeg requires all bug reports to be made on the development branch. The https://laboratory.stolendata.net/~djinn/mpv_osx/ build uses a newer version of ffmpeg (5.1.4) so that likely resolves the issue?

comment:5 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

MacPorts also has the ffmpeg6 port available which the mpv port could be updated to use, if mpv is compatible with ffmpeg 6. Presumably a separate ffmpeg6 port was created (rather than updating the ffmpeg port to that version) because not all software is compatible with ffmpeg 6.

Last edited 7 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 7 months ago by i0ntempest

Idealy I think we should have a ffmpeg portgroup (like the ones for boost and openssl) to handle this. v4 in the default prefix could create problems if some software want v6.

comment:7 in reply to:  5 Changed 7 months ago by Rivers47 (Rivers Chen)

Replying to ryandesign:

MacPorts also has the ffmpeg6 port available which the mpv port could be updated to use, if mpv is compatible with ffmpeg 6. Presumably a separate ffmpeg6 port was created (rather than updating the ffmpeg port to that version) because not all software is compatible with ffmpeg 6.

mpv should support ffmpeg 6 according to https://github.com/mpv-player/mpv/issues/11387

comment:8 Changed 7 months ago by i0ntempest

Confirmed linking ffmpeg6 resolves this crash. PR will be up soon ish.

Last edited 7 months ago by i0ntempest (previous) (diff)

comment:9 Changed 7 months ago by i0ntempest

Resolution: fixed
Status: assignedclosed

In 772d1aa5a7c314db69fa709e04d37e7025467b40/macports-ports (master):

mpv: link ffmpeg6

Closes: #69645

Note: See TracTickets for help on using tickets.