Commit Graph
54186 Commits
Author SHA1 Message Date
Kacper Michajłow cc660f8609 fuzzers: set fontconfig sysroot
Allows to specify custom fontconfig sysroot. Useful for fuzzing
environments where we might use specific config, font or the system wide
config is not available.
2025-08-06 03:14:58 +02:00
Andarwinux 0232ff27a8 ci/mingw: add lcms2
fixes #16614
2025-08-06 01:28:18 +02:00
nanahi 9b1a4366e9 DOCS/man/options: document special wid value -1
This value can be used to tell mpv to detach from the existing parent
into its own window.
2025-08-05 19:59:16 +02:00
nanahi 8b0b186147 options: handle runtime wid change
Add UPDATE_VO flag to the --wid option so that the window embedding
can be changed at runtime without needing to reset another UPDATE_VO
option.
2025-08-05 19:59:16 +02:00
heather7283 91b79d961a client: don't take ownership of result if it is not returned
This fixes memory leak that occured when NULL was passed as result.
2025-08-05 18:18:28 +02:00
nanahi 1d71523407 video/out: make ra_fns const 2025-08-05 03:10:33 +02:00
nanahi ce8032a8ca video/out/gpu/context: make context lists const 2025-08-05 03:10:33 +02:00
nanahi c82d9317a3 filters/f_swresample: make fudge_pairs const 2025-08-05 03:10:33 +02:00
Louis Pate 86e12929aa various: fix Wpedantic warnings 2025-08-01 11:56:38 +02:00
Attila Fidan 21e7c36349 demux_libarchive: normalize stream URL path before escaping
Path normalization can introduce pipe characters from the current
working directory when opening relative paths, which will make the
stream split the path and entry name prematurely. Escape the normalized
path, not the other way around.

Fixes: 440f35a26d ("demux_libarchive: normalize the stream url path")
2025-07-31 15:25:52 +02:00
Kacper Michajłow 03cafa10a7 ci: remove custom rust install step from windows-11-arm job
It is available in image itself now.

See: https://github.com/actions/partner-runner-images/issues/77
2025-07-30 19:44:16 +02:00
Guido Cella 71a6535b05 DOCS: fix FILES section title in links 2025-07-30 16:22:18 +00:00
sfan5 a6f3236c3a ytdl_hook.lua: don't pass any format to youtube-dl by default
yt-dlp changed its default format from `bv+ba/b` to `bv*+ba/b`, which we want to follow
since it fixes the behavior with some streaming sites.

The note that "sometimes youtube-dl returns a format that mpv cannot use" was added in
43c13e5ea2 but it's not clear what it refers to.

fixes #16388
2025-07-28 11:22:13 +02:00
sfan5 2168e3d82c ytdl_hook.lua: get rid of outdated youtube-dl hint
It has never worked for yt-dlp anyway and the relevant error messages
already tell people to update.
2025-07-28 11:22:13 +02:00
Kacper Michajłow 9546e0f7f8 vo_gpu_next: allow UINT upload if no other format is supported 2025-07-28 11:22:08 +02:00
nanahi eaf8a3e8cf DOCS/man/options: add hint to list default sub extensions
Similar to other -exts options.
2025-07-27 15:36:12 +02:00
Louis Pate 73c2118710 meson: add -Woverflow to test flags 2025-07-26 20:13:28 +02:00
Louis Pate 1e64262f1f test: fix Woverflow by using uint8_t array 2025-07-26 20:13:28 +02:00
Attila Fidan 7e94d691b5 demux_libarchive: escape '%' in stream URL path
Opening paths that are detected as archives which contain
'%[0-9A-Fa-f][0-9A-Fa-f]' will fail, because such sequence is treated as
a percent-encoded value when the path gets unescaped causing the path to
be mangled. Escape '%' to prevent this from happening.

Fixes: 2b280f4522 ("stream: libarchive wrapper for reading compressed archives")
2025-07-26 20:12:34 +02:00
Guido Cella b47fd2842a command: normalize stream-open-filename
Since 38ad1ed03b path is normalized but stream-open-filename is not,
making the docs where it says that they are the same wrong, so normalize
stream-open-filename too.
2025-07-24 15:10:44 +00:00
nanahi ff1bb2ff4b Revert "clipboard-wayland: flush display after creating data sources"
Not needed anymore. After data sources are created, the next loop
iteration of clipboard_wayland_dispatch_events will immediately start
and flush display.

This reverts commit c399422722.
2025-07-24 00:35:56 +02:00
nanahi d579527576 clipboard-wayland: create data sources in clipboard thread
Currently, it is done in set_data which is called by core.
It was never meant to do so and it is not thread safe when data
sources are created while a seat is being added/removed.

Fix this by passing a message to clipboard thread instead so that
it is done in a thread safe way.
2025-07-24 00:35:56 +02:00
nanahi 05d0971337 clipboard-wayland: add death message
Used to signal clipboard backend uninit.
2025-07-24 00:35:56 +02:00
nanahi c37756c6a1 clipboard-wayland: rename death pipe to message pipe
Will be used in next commits.
2025-07-24 00:35:56 +02:00
Dudemanguy 71b2324621 player/configfiles: stop parenting mp_get_playback_resume_dir to mpctx
There's no reason for the string to live forever for the lifetime of
mpv. We can free it when we're done. Calling the current-watch-later-dir
property could technically grow memory forever previously.
2025-07-22 17:52:41 +00:00
Dudemanguy 137d5374bd various: remove unneeded option path expansion handling
Same reasoning as the previous commits. This is now handled by the
option system so we can remove the redundancy.
2025-07-22 17:52:41 +00:00
Dudemanguy 768ad8f035 Revert "external_files: parse ~ in --{sub,audio}-paths"
The paths loaded here are already expanded so we can simplify.

This reverts commit 1a25f8c9fb.
2025-07-22 17:52:41 +00:00
Dudemanguy 5c4c067ee6 Revert "options: parse tls-related options as path"
Since the core option parsing does this, we no longer need special
handling here.

This reverts commit 43e83dc74b.
2025-07-22 17:52:41 +00:00
Dudemanguy 43fda5442f Revert "various: expand paths for all file/directory related options"
Since the option system now handles all the path expansion
automatically, these recent changes can be reverted for simplicity.

This reverts commit be15be3a83.
2025-07-22 17:52:41 +00:00
Dudemanguy afbd3abb20 test: always build path_source and options/path.c for test_utils
Because the previous commit started using mp_get_user_path in core
m_option files, various tests failed with undefined references due to
these two files not being included. Add them to the common list of
test_utils files.
2025-07-22 17:52:41 +00:00
Dudemanguy 9b7374ea40 m_option: automatically expand paths for M_OPT_FILE options
Unfortunately, I've already done most of the legwork on expanding paths
manually in the code everytime we encounter one of these options, but it
is completely possible to do it during the option parsing/copying. All
option value setting should go through m_config_set_option_raw at some
point, so this is a good target place to put this logic. Additionally,
the M_OPT_FILE flag already exists for any option that is meant to be
have path values as arguments, so we just needed to add an m_option
method to do this. Fundamentally, this is exactly the same as
m_option_copy except that we potentially expand the value string. A new
expand function pointer is now added and we implement it for the two
option types where this is relevant: OPT_STRING and OPT_PATHLIST.
Furthermore, a m_option_copy_and_expand wrapper is added to handle which
function pointer should be used. With this change, this means that all
path values located in any opt->value pointer should automatically be
expanded and users of the value no longer have to manually do this
themselves. Of course, that means that there's now a ton of redundancy
in the code that can be eliminated. That will be cleaned up in the next
commits.
2025-07-22 17:52:41 +00:00
llyyr 9871ed5e38 wayland: leave window geometry unset
The xdg-shell spec states: "If never set, the value is the full bounds
of the surface, including any subsurfaces. This updates dynamically on
every commit. This unset is meant for extremely simple clients"

mpv's window geometry is never anything other than the full bounds of
the surface, including any surfurfaces, so we don't need to set this
ourselves. This was added in 828dd65ef8 to
workaround a Weston bug, and isn't needed anymore.

Tested on wlroots compositors, kwin and weston.
2025-07-22 17:47:23 +00:00
Oliver Freyermuth 7bfc038528 stream_dvb: allow to enforce DVB-S/T for old zap format channels.conf
If a card supports both DVB-T/T2 or DVB-S/S2, channels.conf.{sat,ter}
was always interpreted as DVB-T2 / DVB-S2 before this change.
After this change, using channels.conf.{sat1,ter1} will enforce
interpretation as DVB-S/T.
The superior VDR channel config format is still the recommended solution
for such cards as it allows to specify the delivery system variant per
channel, but enforcing T2/S2 for cards supporting it whenever the zap
format is used does not seem reasonable.
2025-07-22 08:29:21 +02:00
Kacper Michajłow 0ac07305fb vo_gpu_next: override levels even when hinting colorspace
Color levels is not part of signaled colorspace.

Fixes: b91b71a444
Fixes: #16564
2025-07-21 21:03:55 +02:00
Dudemanguy 440f35a26d demux_libarchive: normalize the stream url path
38ad1ed03b was supposed to normalize all
path names, but the path from the libarchive demuxer works differently.
We need to normalize it within the demuxer itself so you get something
like "archive://<absolute path to archive>" in the property.

Fixes #16247.
2025-07-16 13:42:38 +00:00
Dudemanguy 4ee4444b68 options/path: fix a lie in comment
During the original PR, that was true but mp_normalize_path was changed
in 0755edb327 to allow NULL talloc_ctx.
Deleting the comment was forgotten since it was never true when the
commits were merged, so do it now.
2025-07-16 13:42:38 +00:00
Thomas Hebb 036fae317c sub/lavc_conv: prevent corruption after switching WebM WebVTT subs
WebVTT subtitles in WebM require special logic, and we signal that using
the "webvtt-webm" codec name, which is not part of FFmpeg. That worked
fine until commit 94859997b8 ("sub: update codec info") added a call
to mp_codec_info_from_av(), which overwrites our codec name with
FFmpeg's the first time the subtitle decoder is initialized. As a
result, WebM WebVTT subtitles are currently not rendered correctly after
switching subtitle tracks. Fix the issue by resetting the codec name
after calling mp_codec_info_from_av().
2025-07-16 13:41:54 +00:00
Thomas Hebb 6c720f0f49 sub/lavc_conv: remove unneeded strdup
We originally took the codec name as a separate parameter, making this
talloc_strdup() good hygiene. But since commit 73779a8c70
("sub/lavc_conv: take sd context as a parameter for lavc_conv_create"),
we take the name from the sd context, whose other fields we already
reference. So it should be safe just to copy the pointer like we do in
sub/sd_lavc.c.
2025-07-16 13:41:54 +00:00
Kacper Michajłow dd2cccec19 sub/ass_mp: revert some unwanted changes
We want to add padding around the whole bitmap, not within it. Smaller
parts are rendered onto bigger bitmap. Remove leftover padding code.

Fixes: e2fc75434e
2025-07-16 01:49:29 +02:00
Kacper Michajłow 7d3870b7f8 DOCS/man/options: add a note about MAINPRESUB and gpu-next 2025-07-16 00:12:45 +02:00
Kacper Michajłow 2da63bb4eb vo_gpu_next: reduce fp conversions in overlay color
This is cosmetic, shouldn't matter in practice.
2025-07-16 00:12:45 +02:00
Kacper Michajłow 3a7a027f44 vo_gpu_next: add support for blend-subtitles=video
Render subs and video resolution. Important for performance of some
heavy typesetting.
2025-07-16 00:12:45 +02:00
Kacper Michajłow e2fc75434e sub/ass_mp: add missing padding for ass packer
This ensures it is safe to sample packed image with bilinear filtering.
2025-07-16 00:12:45 +02:00
Kacper Michajłow 55043cb5c8 vo_gpu_next: don't do partial updates on hint luminance
This ensures that we don't mix maxCLL if target already has max_luma.
This can be opt-in with mode=source and manual target-peak override. No
need to merge to much things.
2025-07-16 00:09:49 +02:00
Dudemanguy 5c4c27e6b1 m_option: remove unneeded legacy syntax parsing
This code got shuffled around over the years but fundamentally it was
first introduced in 2c22fcd350 to fix a
parsing issue with specifically the af and vf options. Syntax like af*
and vf* used to be valid and this was part of dealing with that case.
Later 50008adf4a completely changed this
and ripped out support for the wildcard behavior. But these few lines to
deal with the special case were never removed. The token splitting has
been unnecessary for years and is confusing, so clean this up and
finally remove it.
2025-07-15 18:06:14 +00:00
Dudemanguy 2763390c15 input/cmd: use m_option_set_node_or_string
Like the previous commit, this has a conditional that matches exactly
what this helper function is supposed to do. For logging reasons, we
can't completely remove the val->format comparison, but it can be
simplified to be cleaner.
2025-07-15 18:06:14 +00:00
Dudemanguy 04ca4fd1ed m_config_frontend: use m_option_set_node_or_string
There is a usage of m_option_parse which exactly mirrors the intention
of the helper function m_option_set_node_or_string. Instead of
duplicating the logic, just call the m_option_set_node_or_string
instead.
2025-07-15 18:06:14 +00:00
Dudemanguy 024628eb4b m_option: change m_option_set_node_or_string to accept bstr directly
It's easier for potential callers of this to convert char to bstr than
vice versa. Internally, the function uses bstr anyway so just eliminate
the conversion and let callers do it. The next commit will add another
caller of this where the bstr param is preferable.
2025-07-15 18:06:14 +00:00
Dudemanguy fdbea0fe66 vo_dmabuf_wayland: don't set HDR metadata on SDR transfers
This probably didn't do anything previously, but technically SDR
transfers could theoretically have HDR metadata and we would set them.
This isn't worth supporting so skip this step for SDR.
2025-07-15 01:22:41 +00:00
Dudemanguy 699054cfd9 vo_dmabuf_wayland: use pl_color_space_infer on HDR transfers
vo_gpu_next already does this. If we have HDR, try to fill out any
missing values before doing validation.
2025-07-15 01:22:41 +00:00