Commit Graph
100 Commits
Author SHA1 Message Date
llyyr f4d13e1c2c wayland: handle null output in wl_surface.enter event
This is seemingly possible: https://wayland.freedesktop.org/docs/book/Message_XML.html#allow-nulltrue--false
2026-08-10 04:39:39 +00:00
llyyr 513d3407d4 wayland: wait for initial surface configure before attaching buffer 2026-08-09 04:09:06 +00:00
llyyr 8c67647b50 wayland: don't leak wl_fixes on uninit
I fixed this locally but forgot to push it before the original commit
got merged, oh well

Fixes: 6f6c29b0b4
2026-07-24 12:53:05 +00:00
llyyr 6f6c29b0b4 wayland: use wl_fixes.ack_global_remove on global_remove
Notifies the compositor that the removed global will not be bound, so
the compositor can destroy it.

Ref: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/533
2026-07-23 12:29:49 +00:00
llyyr 25451bcc11 player/command: don't refresh sub stream on UPDATE_SUB option updates
Back when reselect_demux_stream call was added in this path in 700f72f,
sub_redecode_cached_packets only retained the last two packets. The
subtitle decoder cache was changed in 0a4b098 to retain the whole packet
sequence. Therefore sub_redecode_cached_packets by itself can rebuild
the new decoder state entirely from packets held in memory, and we no
longer need the demuxer to refresh the track.

This fixes expensive track refresh for network streams, where changing
some sub-* options during runtime of network streams would cause the
cache to be dropped
2026-07-22 20:51:55 +02:00
llyyr 8e88661257 video/out/hwdec_cuda: use mp_msg for ffnvcodec logging
ffnvcodec falls back to fprintf(stderr) unless FFNV_LOG_FUNC and
FFNV_DEBUG_LOG_FUNC are defined by the user
(https://github.com/FFmpeg/nv-codec-headers/blob/master/include/ffnvcodec/dynlink_loader.h#L80-L84).
Define these callbacks so CUDA loader messages go through mpv's normal
logging instead.
2026-07-06 18:26:36 +02:00
llyyr c8c7d91a8e ci/freebsd: bump freebsd version to 15.1 2026-07-06 13:17:01 +02:00
llyyr d8c82c3b16 ao_pipewire: convert pw_time.queued from bytes to frames
pw_time.queued is reported in bytes, while the code here expects it in
nframes.

Note that this doesn't matter at all, because pw_time.queued is always 0
for us since we use it as a pull-based AO. This would be a latent bug if
we ever switched to push model.
2026-06-27 21:06:47 +02:00
llyyr 3159500884 f_auto_filters: destroy deint filter immediately on format change
When the image format changes (e.g. switching hwdec), immediately
destroy the existing deinterlace filter instead of draining it. Draining
feeds new frames through the old filter, which can cause issues. (e.g.
bwdif_vulkan receiving vaapi frames).

This fixes userdeint filter failure when switching from hwdec=vulkan to
hwdec=vaapi while the filter is applied via --deinterlace=auto/yes
2026-06-17 13:37:57 +00:00
llyyr 4acaa77de5 af_scaletempo: avoid memcpy with disabled overlap
Overlap can be disabled with overlap=0 or very small stride values which
cause calculated overlap size to truncate down to 0.

Fixes: https://github.com/mpv-player/mpv/issues/18107
2026-06-17 13:37:34 +00:00
llyyr 9d828d5e55 vulkan/context: guard for null --vulkan-device param
Fixes: https://github.com/mpv-player/mpv/issues/18106
2026-06-17 13:37:34 +00:00
llyyr 7d245fd100 video/gpu/lcms: remove stray pointer from video profile handle
cmsHPROFILE is already a pointer type
2026-06-12 19:15:18 +02:00
llyyr bda1dcaa78 video/gpu/lcms,vo_gpu_next: avoid returning bool from pointer functions 2026-06-12 19:15:18 +02:00
llyyr 3d4893a893 test/language: replace accidental octal literal
Surrounding code uses decimal 0, not octal 0, so probably a typo
2026-06-12 19:15:18 +02:00
llyyr cce65c722c wayland: map ICtCp coefficients to BT.2100 HLG as well
H.273 defines a single ICtCp matrix coefficients for both BT.2100 PQ and
HLG.
2026-05-27 15:21:19 +02:00
llyyr 9e06c3248a ao_pipewire: avoid passing NULL to mp_msg 2026-05-22 17:51:57 +00:00
llyyr 1a78f9fa8e ao_pipewire: avoid deadlock when starting thread loop
loop_start starts a thread which immediately acquires the thread loop
lock. Locking the loop before loop_start can therefore deadlock the
newly created thread during initialization.

Locking the thread loop before loop_start was always incorrect, but
Pipewire commit fb49e0795c28* made the issue visible by switching
pw_thread_loop_lock to the underlying SPA loop lock.

To fix this, we just avoid starting the loop until after we're connected
to the server.

* https://github.com/PipeWire/pipewire/commit/fb49e0795c28c892116b03369785ba86c27c968d
2026-05-22 17:51:57 +00:00
llyyr d521821573 demux_cue: fix audio file lookup inside subdirectory
The FILE field in a CUE sheet may contain a relative path with
subdirectories. It's not clear if this usecase is intended to be
supported, as none of the usual CD/DVD ripping tool generates this type
of FILE field in the CUE sheet. The specification is old and abandoned,
so this will likely never be clarified and it doesn't cost much to
support it so might as well...
2026-05-20 23:22:18 +02:00
llyyr a16b333eef meson: bump libcurl minimum version to 7.87.0
CURL_WRITEFUNC_ERROR is only avaialble from 7.87 onwards
2026-05-19 15:55:13 +02:00
llyyr f4d059b1d9 vd_lavc: disallow hwdec for grouped streams
44a2c33939 tried to do this in a cute way by unsetting the hwdev to
be used for hwdec, but this doesn't prevent -copy variants from being
probed. Instead explicitly disallow it for grouped streams
2026-05-13 22:24:07 +02:00
llyyr 914114a2cf wayland: fix typo 2026-05-13 15:28:29 +00:00
llyyr 02b4f8ca69 wayland: remove stray spaces before function call parenthesis 2026-05-13 15:28:29 +00:00
llyyr 90f63675ce wayland: return bool values for bool type create_input function
Also invert the return value to better match the rest of the file, and
adjust callers accordingly.
2026-05-13 15:28:29 +00:00
llyyr bef4dc37db wayland: convert create_xdg_surface to bool
create_xdg_surface returns success/failure, so use bool instead of int
for its return type. Also invert the return values to better match the
style of the rest of the file, also adjust callers accordingly.
2026-05-13 15:28:29 +00:00
llyyr ff2d112132 wayland: convert create_viewports to bool
create_viewports returns success/failure, so use bool instead of int for
its return type. Also invert the return values to better match the style
of the rest of the file, also adjust callers accordingly.
2026-05-13 15:28:29 +00:00
llyyr e92538b1db wayland: convert spawn_cursor to bool
spawn_cursor returns success/failure, so use bool instead of int for its
return type. Also invert the return values to better match the style of
the rest of the file, also adjust callers accordingly.
2026-05-13 15:28:29 +00:00
llyyr d28bc02393 wayland: convert check_for_resize to bool
Only returns if a resize edge was found
2026-05-13 15:28:29 +00:00
llyyr ae811ddbbb wayland: log current preferred scale, not older stale one 2026-05-13 15:28:29 +00:00
llyyr 6c34c07b36 wayland: null-check before munmap call
munmap(NULL, 0) returns a failure, also this follows project style
2026-05-13 15:28:29 +00:00
llyyr db4506be45 wayland: fix resize edge boundary checks
The `>` checks exclude a pixel, which is asymmetric with the `<` checks.
Use `>=` for the right and bottom resize edge checks, to not skip a
pixel.
2026-05-13 15:28:29 +00:00
llyyr 3a5e05720e wayland: fix condition for tablet tool cursor shape device destroy 2026-05-13 15:28:29 +00:00
llyyr 0be060ed76 wayland: fix mapping for PAL/NTSC primaries
525 lines is NTSC, 625 lines is PAL. Previously we had them reversed.
2026-05-13 15:28:29 +00:00
llyyrandGuido Cella 44a2c33939 f_decoder_wrapper: disable non-copy hardware decoding for stream groups
This allows playing tile grid images without manually disabling hardware
decoding. There is no other type of stream group known to support
hardware decoding so far.

Co-authored-by: Guido Cella <guido@guidocella.xyz>
2026-05-13 14:55:48 +02:00
llyyr 4414547d62 wayland: use lrint for keepaspect window sizing
Avoid biasing sizes upwards
2026-05-09 14:50:17 +02:00
llyyr 1a1288184a wayland: force redraw on every configure when in toplevel resize state
This fixes stalled/slow resize when there's only an image being
displayed or no output at all. When there's a video playing, the video
implicitly causes a redraw but we need to redraw ourselves when there's
no video.

Fixes: https://github.com/mpv-player/mpv/issues/16744
2026-05-09 14:50:17 +02:00
llyyr 948c86d24c player/lua: fix autofree ctx leak on exit() call
Fixes LSAN leak when tests call fail() and exit(1) is called. We have
mpv_destroy set for atexit but data.ctx was null parented, so it had no
parent to be freed by. Parent it to script_ctx instead so it gets
cleaned up by mpv_destroy.

LSAN output:

Direct leak of 400 byte(s) in 5 object(s) allocated from:
    #\0 0x7f4c6c52c01f in malloc (/lib64/libasan.so.8+0x12c01f) (BuildId: db0aa5bf57ed53a5869a3a2cc49051292ceb6390)
    #\1 0x7f4c6b276388 in ta_alloc_size ../ta/ta.c:139
    #\2 0x7f4c6b2bf01f in script_autofree_trampoline ../player/lua.c:1310
    #\3 0x7f4c69373b15  (/lib64/libluajit-5.1.so.2+0xbb15) (BuildId: 182622c63dea3dd74173bbd5a810051a76bcf4d9)
2026-05-03 17:25:17 +02:00
llyyr d8be86067c ao_pulse: fix subscribe_cb using wrong bitmask for event type
PA_SUBSCRIPTION_MASK_SINK is a pa_subscription_mask constant used when
registering with pa_context_subscribe(), not a
pa_subscription_event_type mask. Masking the event type with it would
never match PA_SUBSCRIPTION_EVENT_NEW or PA_SUBSCRIPTION_EVENT_REMOVE,
causing hotplug events to be silently dropped.

Fixes: e01750020d
2026-05-03 06:44:37 +02:00
llyyr a44478d79f vulkan/context: avoid printing incorrect error on vulkan-device fail
M_OPT_INVALID says "option parameter could not be parsed" which is
incorrect for some failures this parser might encounter. Instead print
something that might be useful for the user to debug.

Vulkan instance might fail to create if there's no vulkan drivers that
mpv can see, or devices might fail to enumerate for whatever reason
2026-05-01 06:09:00 +02:00
llyyr ac852ab9df demux/packet: fix version check for SMPTE 2094-50 metadata
This enum was added in lavc 62.30.100 in https://github.com/ffmpeg/ffmpeg/commit/7faa6ee2aa01
The doc/APIchanges version listed in that commit is incorrect, it's
actually lavc 62 not lavc 60.

Fixes build failure with ffmpeg between
https://github.com/ffmpeg/ffmpeg/commit/6ba6db4f195c and https://github.com/ffmpeg/ffmpeg/commit/7faa6ee2aa01

Fixes: 76df24f40c ("demux/packet: add support for SMPTE 2094-50 metadata")
2026-04-19 16:11:38 +02:00
llyyr 8665237a07 wayland: use av_gcd instead of implementing our own gcd function
Adds mp_gcd wrapper for av_gcd and uses it instead.
2026-04-18 17:55:26 +02:00
llyyr 552d8fa91e vo_drm: use drmModeDestroyDumbBuffer instead of using the ioctl directly 2026-03-31 18:22:54 +00:00
llyyr 8b2e3bf786 vo_drm: use drmModeMapDumbBuffer instead of using the ioctl directly 2026-03-31 18:22:54 +00:00
llyyr 5bb30a6f6c vo_drm: use drmModeCreateDumbBuffer instead of using the ioctl directly
Also remove `fb->handle = 0` assignment because the framebuffer struct
is already zero initialized.
2026-03-31 18:22:54 +00:00
llyyr 64c4309697 drm_prime: use GEM_CLOSE wrapper instead of using ioctl directly 2026-03-31 18:22:54 +00:00
llyyr 4bed99f6a5 meson: bump minimum libdrm version to 2.4.114
We'll use the dumb buffer helpers added in 2.4.114 and GEM_CLOSE wrapper
added in 2.4.108. This is available on Ubuntu 24.04 and Debian 12.
2026-03-31 18:22:54 +00:00
llyyr c8e3a2ec52 drm_common: change type of framebuffer.size from uint32_t to uint64_t
Matches the defintion in kernel headers.
2026-03-31 18:22:54 +00:00
llyyr adff00c8aa wayland: don't use surface local coordinates if we haven't received them
vo_wayland_handle_scale may be called from reconfig, even before we get
the first toplevel_configure. In this case, don't use the surface local
coordinates because they will be initialized as 0.
2026-03-30 01:01:43 +00:00
llyyr de118fdb70 m_option: don't allow m_geometry_apply to make a coordinate 0
Same reasoning as the previous commit.
2026-03-30 00:53:18 +00:00
llyyr e9a1f82345 wayland: scale edge pixel threshold by scaling factor 2026-03-30 00:32:51 +00:00
llyyr b824aec50f wayland: document that wayland-edge-pixels-touch only affects CSD 2026-03-30 00:32:51 +00:00
llyyr 51ef7c5960 wayland: use wayland-edge-pixels-pointer for tablet input resize zone
Tablet input is more similar to mouse input than it is to touch input,
so it makes sens to use wayland-edge-pixels-pointer instead. Also
document that it's used for tablet input, previously this was completely
undocumented.
2026-03-30 00:32:51 +00:00
llyyr ef531e19c3 vulkan/context: remove pl_swapchain_resize in set_color
ref: https://code.videolan.org/videolan/libplacebo/-/merge_requests/811
2026-03-29 18:00:48 +02:00
llyyr 251a2b6f49 wayland: alphabetize static function definition
Also fix some inconsistent indenting while at it
2026-03-27 16:40:41 +00:00
llyyr 63d0beb67c wayland: use designated initializers for protocol listeners
Replace order-dependent struct initialization of Wayland listener
structs with designated initializers.

Besides making it harder to make ordering mistakes while adding or
changing code, also makes it easier to grep for specific events because
our callback functions aren't necessarily named the same as the event
names (e.g. global_remove = registry_handle_remove).
2026-03-27 16:40:41 +00:00
llyyr 4d16b0938d wayland: fix typo in log message 2026-03-27 16:40:41 +00:00
llyyr 065146c9b8 wayland: wrap color mgmt functions in ifdefs instead of their bodies 2026-03-27 16:40:41 +00:00
llyyr 38cf424134 wayland: remove set_img_desc goto from set_color_management
A bit easier to understand perhaps
2026-03-27 16:40:41 +00:00
llyyr 96de78f914 wayland: validate metadata before set_luminance
It's still invalid for max_lum to be less than or equal to min_lum, so
do the check before set_luminances call. Also rename the function
because it does more than just check if it's valid, it also sanitizes
some invalid values.

Also changes the TRC_LINEAR case a bit, because min_luma == 0 isn't
exactly invalid, only min_luma >= max_luma is invalid which is covered
by the sanitize function
2026-03-27 16:40:41 +00:00
llyyr 3cf31bf7a4 wayland: reduce branching when printing log for unsupported prim/tf
Also move scRGB comment inside ifdef
2026-03-27 16:40:41 +00:00
llyyr 56832b2bdb wayland: reduce branching in color-management info_done 2026-03-27 16:40:41 +00:00
llyyr 89febe90c2 wayland: move last_zero_copy to fback_pool 2026-03-23 00:31:35 +01:00
llyyr 9021c3263a clipboard-{x11,wayland}: replace static const with enum
Fixes gcc build with certain build options
2026-03-21 23:27:04 +01:00
llyyr 7b1ee864b8 input: only allocate key name if we've printing trace level messages 2026-03-19 20:45:55 +01:00
llyyr 520faac68d input: fix leaking tablet tool key name 2026-03-19 20:45:55 +01:00
llyyr 5f9e1bc7bd wayland: guess best containing primary from raw primaries 2026-03-17 10:49:09 +01:00
llyyr 5a45669663 vo_gpu_next: move get_best_prim_container to csputils
Used in next commit
2026-03-17 10:49:09 +01:00
llyyr b51131dff9 ci/freebsd: bump to FreeBSD 15.0 2026-03-15 18:40:09 +01:00
llyyr a71da301b0 ci/{freebsd,openbsd,linux-old}: clone the latest supported libplacebo 2026-03-15 18:40:09 +01:00
llyyr 022fbd16b9 meson: bump min libplacebo version to v7.360.1
This version contains critical fixes to swapchain selection, correct
mapping of sRGB TRC as well as fix for gpu hangs on anv. Bump the
minimum version because the mpv experience with previous version
shouldn't be endorsed or be considered acceptable by upstream.
2026-03-15 18:40:09 +01:00
llyyr 3945a41872 wayland: fix alpha mode mapping for color-representation
Fixes: ed8954e8cf ("wayland: add support for wp-color-representation-v1")
2026-03-15 17:43:27 +01:00
llyyr afef9126ce wayland: don't try to do anything on data_device.motion
The keyword here is "try". mpv attempts to accept data offer on motion,
by using the time as the serial... which doesn't do anything. We already
accept data offers on data_device.enter so this doesn't do anything even
if we used the right serial.

Fixes: 68f9ee7e0b
2026-03-14 15:10:59 +00:00
llyyr e96c8ed650 video/vaapi: mark nvidia-vaapi-driver as emulated driver
This should match the vendor string[1] provided in that project, and mpv
will skip using this driver on Nvidia. nvidia-vaapi-driver segfaults
when trying to decode 4:4:4 videos, and there's no reason for Nvidia
users to use this layer in mpv anyway. Use nvdev or vulkan instead.

1: https://github.com/elFarto/nvidia-vaapi-driver/blob/c4e1788b6d554f29adec31f3f8aa984c143c54c1/src/vabackend.c#L2331-L2335
2026-03-14 12:55:40 +01:00
llyyr 3b55bc9795 wayland: dispatch queue until image_description_pending flag is cleared
wl_display_roundtrip performs one roundtrip one the queue, but there's
no guarantee that the callback will be invoked within that roundtrip.

Instead of hoping one roundtrip is enough, dispatch the queue until the
pending flag is cleared explicitly.
2026-03-05 19:16:30 +01:00
llyyr 35443a74cb vo,vo_dmabuf_wayland: remove vo_wait_on_vo
Not needed after previous commit
2026-03-03 03:01:41 +01:00
llyyr 8012dc88f7 wayland: do a roundtrip to wait for image description creation
Also switch to a different event queue to ensure there are no other
events in the queue.
2026-03-03 03:01:41 +01:00
llyyr e09a1d12f2 m_option: also clamp OPT_FLOAT values for float_set
This incorrectly used clamp_double function after 0e7f9c39dc when it
should've always used clamp_float instead. Use clamp_float instead

Fixes: 0e7f9c39dc ("m_option: correctly clamp OPT_FLOAT values")
2026-02-24 19:41:53 +01:00
llyyr 1a160f9767 Revert "ci/tumbleweed: disable sanitizers for GCC build"
This reverts commit 5b0cfe8849.

Shouldn't be needed after previous commit
2026-02-14 00:43:52 +01:00
llyyr a7523a4afd demux_mf: satisfy gcc ubsan so it doesn't produce bogus warnings
Since we call bstr0 on the string anyway, might as well use it for
printing which implicitly includes a null check that gcc can see so it
doesn't produce the warning as seen in the next commit anymore
2026-02-14 00:43:52 +01:00
llyyr f0f9322c57 vo_dmabuf_wayland: only wait for image description if we have a buffer
Waiting for color management from the compositor doesn't make sense in
other cases and this breaks --force-window since the playloop doesn't
advance. Fixes #17391.
2026-02-10 00:35:28 +00:00
llyyr 67886c97dd vulkan: set pl_vulkan_swapchain_params.alpha_bits if alpha needed
We can try to calculate specific amount of bit required in the future,
and also populate color_bits field but for now this should suffice.

Ref: https://code.videolan.org/videolan/libplacebo/-/merge_requests/767
2026-02-08 18:52:56 +01:00
llyyr db22a4528f vo: reset wait_on_vo if render_frame is called without current_frame
Fixes a deadlock when switching vo before a frame is displayed (e.g.
with auto profiles) where we'd end up in a state where wait_on_vo is set
to true for the first frame and then draw_frame is never called again so
its value never changes even once dmabuf-wayland is ready to advance
frame

Fixes: 468d34c9bd ("vo: allow VOs to request waiting before advancing frames")
2026-02-02 01:04:16 +00:00
llyyr 491802918e f_auto_filters: rework --deinterlace=auto option
Before this commit, deinterlace=auto and deinterlace=yes had the same
exact behavior for d3d11 and vaapi, the only difference being that
`auto` would create/destroy the deinterlacing filter on every frame that
changed the deinterlace flag and with `yes`, we left that the
responsibility to determine whether to deinterlace or not to d3d11vpp
and vavpp and the filters were always inserted.

Inserting and removing filters on every frame the interlaced flag changes
is expensive and it will be more efficient to let the deinterlacing
filters handle this distinction instead.

With this change, `yes` works as it should: the filter is inserted
always and deinterlacing is forced regardless of the frame flag. `auto`
will insert the deinterlacing filter only when mpv sees the first
interlaced frame, and the filter will only deinterlace the frames marked
as interlaced. Note that perfect detection of interlaced frames is not
possible, and in such cases the user has to set `yes` manually.

One downside of this change is that we don't know if the filter is
actually deinterlacing or not, we can only guess that if the filter is
inserted and the frame is interlaced then it should be deinterlacing.
It's possible for it to fail for whatever reason, and it's also possible
future changes to ffmpeg (since bwdif implementation lives in ffmpeg),
might make the logic more complicated than this check. However, for now
this is good enough.
2026-01-21 08:40:50 +01:00
llyyr b7e8fe949d wayland: move info_done variable to vo_wayland
vo_wayland_preferred_description_info is destroyed after info_done, so
obviously we can't store it here. This causes a use-after-free.
Embarrassing mistake

Fixes: 7a7d871d0a
2026-01-18 16:11:37 +00:00
llyyr 7a7d871d0a wayland: move image description info to separate queue
Helps with presentation when compositor tries to ddos applications, for
example when moving the brightness slider on Kwin.
2026-01-15 17:03:18 +00:00
llyyr 363341afea vo: don't set request_redraw on redraw path
We need to acquire in->lock first before setting this flag, but if we
take this path then request_redraw is true already. So fix the data race
by just not re-setting the value.

This fixes data race detected with checking in->request_redraw value in
vo_redraw detected with TSAN
2026-01-12 09:15:45 +01:00
llyyr 9229d52e75 vo_gpu_next: undo dither-depth=auto meaning 8bpc for SDR when undetected
This commit effectively reverts f914947dda

We don't need this hack anymore
2026-01-09 20:05:37 +01:00
llyyr 81687dbf27 video/out/vulkan/context_wayland: implement color_depth
In f914947dda we implemented a hack to
force 8bpc dithering for SDR playback, because at the time nothing in
the pipeline was doing dithering. mpv would pick 16bpc swapchain, dither
down to 16bpc, then it'd be presented to the user's display as-is and
result in banding. There is no way to detect the real on-the-wire bpc,
so we told users to configure dither-depth manually.

However, it seems most compositors that do color management now handle
10-16bpc input just fine without any banding, so instead implement
color_depth to effectively set dither-depth=auto for compositors that
support expose color_manager and keep the 8bpc hard default for others.

Fixes: https://github.com/mpv-player/mpv/issues/17222
2026-01-09 20:05:37 +01:00
llyyr 0035bb7cbd path-unix: check fopen value, and also call fclose 2026-01-04 21:50:04 +01:00
llyyr c66204b69b screenshot: correctly detect hardware frame
This only ever worked by accident and relied on broken behavior that was
fixed by 9b1d47ece1
2025-12-27 15:41:24 +01:00
llyyr 8ba0603ffa wayland: bump wayland-protocols minimum version to 1.38
Debian Stable has 1.44 but we're gated by Ubuntu LTS here.
2025-12-22 15:00:02 +01:00
llyyr 9adeeb02ea wayland: bump libwayland minimum version to 1.22
1.23.1 is available in Debian Stable, which was the last distro holding
us back from doing version bumps
2025-12-22 15:00:02 +01:00
llyyr 17cfad0b74 wayland: use rendering intent enum instead of magic value 2025-12-21 17:26:08 +00:00
llyyr 51ae55bdc9 wayland: support color-management-v1 version 2 2025-12-21 17:26:08 +00:00
llyyr 4623a0a7e8 osc.lua: remove flags from disable_key_bindings
disable-section doesn't accept flags, and has no need for it either.

Fixes: c209d4f73b
2025-12-18 13:06:46 +01:00
llyyr f7be2ee3e9 ao_aaudio: set content type if --audio-set-media-role is enabled 2025-12-13 15:18:12 +01:00
llyyr e99daecbdb ao_audiotrack: set content type if --audio-set-media-role is enabled 2025-12-13 14:46:55 +01:00
llyyr d07e4c7935 ao_pulse: set media.role if --audio-set-media-role enabled 2025-12-13 14:46:55 +01:00
llyyr 1a802b1810 ao_pipewire: avoid setting any media.role by default
This adds option `--audio-set-media-role` to configure whether mpv
should set media roles to supported audio APIs or not. Disabled by
default.

By default, WirePlumber restores the volume of each application to
whatever the last application with the same media role used. This is
completely insane behavior, and I couldn’t find any way for a user to
opt out of it on my end. The `state-stream.lua` script responsible for
this mess only uses media.role if the property is present, so the only
reliable workaround is simply not to set one at all.

This WirePlumber behavior is inherited from PulseAudio, which also
exhibits the same behavior to this day.

This commit also mirrors the same change made to ao_pulse in 2015:
b7325b2f64

See also: https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/489
2025-12-13 14:46:55 +01:00
llyyr b6c35b55a0 player/video: only set a/v speed factor to 1 when exiting display-sync
Previously this would be called on every frame presented, this only
needs to be called if display sync was active for the last frame but
isn't active anymore.

This hid the bug mentioned in #16947 if VO was active.
2025-11-26 19:18:25 +00:00
llyyr ddd0fc0beb player/command: update speed filters for pitch-correction change too
Fixes #16947 for both audio only files as well as for files with video
which would only accidentally worked. See next commit
2025-11-26 19:18:25 +00:00