Commit Graph
55273 Commits
Author SHA1 Message Date
sfan5 3f1b23abd0 stream_curl: fix libavformat version checks
Unfortunately ffmpeg missed the backport of <https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/1a7e802c8f970e76807f08c3d3fb3513ae5a4882>,
so custom IO is still segfaulting on the older versions.
2026-06-29 14:58:15 +02:00
Kacper Michajłow 5abce15f1c vf_d3d11vpp: enable NVIDIA RTX Video only for SDR input
This filter only converts SDR to HDR, so disable it if we have already
HDR on input. Note that it also seems to be disabled if HDR is disabled
in Windows, but we don't check that, because filters are not related to
display. Use conditional profile to enable this filter when needed, this
commit is only small convenience change.

Fixes: #17800
2026-06-28 17:22:20 +02:00
Kacper Michajłow 4dbc235dba select.lua: add property_set getter 2026-06-28 16:36:32 +02:00
yangli 523aea99ad {select,console}.lua: release memory of menu items after menu closing
select.lua: `properties` is a large table containing 10k+ elements,
currently it's a global variable, which makes its memory cannot be
reclaimed by the GC after menu closing, so let's simply change it
to a local variable.

console.lua: `selectable_items` has the same issue, however, it cannot
be changed to a local variable because it is used by too many functions,
but at least we can reset it to nil when closing console.
2026-06-28 16:35:54 +02:00
dependabot[bot] 42149e9eac ci: bump cross-platform-actions/action from 1.2.0 to 1.3.0
Bumps [cross-platform-actions/action](https://github.com/cross-platform-actions/action) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/cross-platform-actions/action/releases)
- [Changelog](https://github.com/cross-platform-actions/action/blob/master/changelog.md)
- [Commits](https://github.com/cross-platform-actions/action/compare/v1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: cross-platform-actions/action
  dependency-version: 1.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-28 15:57:06 +02:00
dependabot[bot] 508d25590d ci: bump actions/cache from 5 to 6
Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-28 15:56:36 +02:00
Kacper Michajłow 62f1494661 vo_gpu_next: follow reference white system setting
This is mostly useful for SDR mode where previously we would output 203
nits, which on Windows is considered HDR, because reference white is
fixed at 80 nits in SDR mode. Which in turn causes additional
tone-mapping when using scRGB output.

Note that for SDR transfers this doesn't change the luminance, but
instead causes more aggressive tone-mapping, might not be fully
expected. But maybe we should follow system setting for better of for
worse.

Fixes: https://github.com/mpv-player/mpv/issues/17850
Not fully, because when ICC profile is embeded in content, libplacebo
will override our luminance, this will be fixed separately.
2026-06-27 23:15:26 +02:00
Kacper Michajłow a01e391851 vulkan/context_win: implement target_ref_luma 2026-06-27 23:15:26 +02:00
Kacper Michajłow be8d1eb3d6 vo/gpu/context: add preferred_ref_luma function 2026-06-27 23:15:26 +02:00
Kacper Michajłow a8a1cdbbbb d3d11/context: implement target_ref_luma 2026-06-27 23:15:26 +02:00
Kacper Michajłow 069a6f004e vo/gpu/context: add target_ref_luma function 2026-06-27 23:15:26 +02:00
Kacper Michajłow 5d15a41b0f vo/win32/d3d11_helpers: add mp_dxgi_sdr_white_level_from_hwnd() 2026-06-27 23:15:26 +02:00
Kacper Michajłow 245652c34c vo/win32/displayconfig: add mp_w32_displayconfig_get_sdr_white_level 2026-06-27 23:15:26 +02:00
Kacper Michajłow fe4eaf7c9d stream_curl: add support for Icecast metadata 2026-06-27 21:47:41 +02:00
Kacper Michajłow 5c97ee2a48 stream_lavf: use common Icecast metadata parser 2026-06-27 21:47:41 +02:00
Kacper Michajłow aa845b965a stream/network: add Icecast metadata parser 2026-06-27 21:47:41 +02:00
Guido Cella 8395d89069 vo_gpu{,_next}: use mp_basename_bstr() 2026-06-27 21:43:18 +02:00
Guido Cella 9dbf5d681d misc/path_utils: rename bstr_strip_ext() to mp_strip_ext() 2026-06-27 21:43:18 +02:00
Guido Cella 089c172dff misc/path_utils: rename bstr_get_ext() to mp_get_ext() 2026-06-27 21:43:18 +02:00
Guido Cella 4fa3c38983 misc/path_utils: remove mp_splitext()
It is no longer used.
2026-06-27 21:43:18 +02:00
Guido Cella 1a09154988 various: replace mp_splitext() with bstr_get_ext()
This will allow removing mp_splitext().
2026-06-27 21:43:18 +02:00
Guido Cella 9ffc0cd861 misc/path_utils: remove mp_strip_ext()
It is no longer used.
2026-06-27 21:43:18 +02:00
Guido Cella df3b76b018 various: replace mp_strip_ext() with bstr_strip_ext()
This will allow removing mp_strip_ext().
2026-06-27 21:43:18 +02:00
Guido Cella 2057e34f45 misc/path_utils: make bstr_strip_ext() and bstr_get_ext() accurate
Move bstr_strip_ext() and bstr_get_ext() to path_utils.c making them use
split_ext(), which is better than the previous bstr.c implementation
because it doesn't consider . in the dirname or at the start of
basenames.
2026-06-27 21:43:18 +02:00
Guido Cella 381e7eb155 misc/path_utils: add split_ext()
This will be used by bstr_get_ext() and bstr_strip_ext() without
allocating memory.
2026-06-27 21:43:18 +02:00
Guido Cella 4eaef66f4c bstr: don't make bstr_splice() add to NULL
If str.start is NULL, don't error on FreeBSD + ASan with "applying zero
offset to null pointer" in bstr_splice().

This will avoid an error in split_ext() in the language test with NULL
as argument.
2026-06-27 21:43:18 +02:00
Guido Cella 29c26b5bc5 misc/path_utils: add mp_basename_bstr()
This will be used by bstr_get_ext() and bstr_split_ext() without
allocating memory.
2026-06-27 21:43:18 +02:00
Guido Cella 9bfdb3d67f vo_gpu{,_next}: use bstr_strip_ext()
Because it is simpler than mp_splitext(), and will allow removing
mp_splitext().
2026-06-27 21:43:18 +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
Kacper Michajłow 1cf081e66c select.lua: register not yet evaluated properties to item
In case when during parse and initial item creation there is only single
property evaluated, in case like `prop1 or prop2`. Only `prop1` is
evaluated and added to observe that will make item dirty. However, when
item is dirty, we may need to evaluate the rest of the expression,
especially important to add it to observe, so we mark it dirty next
time.

Fixes: #18153
2026-06-27 20:57:24 +02:00
Kacper Michajłow 80865a7d1f f_swresample: guard invalid memory access also in NDEBUG
Mostly to make GCC happy and fix array-bounds warning.
2026-06-27 20:39:35 +02:00
Kacper Michajłow a40319a514 osdep/compiler: make MP_ASSERT_UNREACHABLE no return
On some platforms assert is continuable, we don't want that, so abort()
just after.
2026-06-27 20:39:35 +02:00
Kacper Michajłow fb6c700ecb meson: try vapoursynth-script first
Older versions ship separate `vapoursynth-script.pc` and
`vapoursynth.pc`, we want to use `script` one. Try it first, if not
available use `vapoursynth`, which is the only one new version ships.
2026-06-27 19:16:30 +02:00
Kacper Michajłow ccfe4871db test/avio_crypto: add test for stream decryption 2026-06-27 19:04:03 +02:00
Kacper Michajłow 449944e25f demux/avio_crypto: add AES decryption
This mirrors `crypto+` protocol from ffmpeg, which is used in HLS
demuxer. Unfortunatelly ffmpeg doesn't use custom io_open in their
crypto.c, so we spin our own decryption.
2026-06-27 19:04:03 +02:00
Kacper Michajłow fc26cd23c0 msg: strip raw C1 controls and skip valid UTF-8 in sanitize
Fixes: #17957
2026-06-27 18:55:17 +02:00
arch1t3cht 7da362dfb5 demux_mkv: support demuxing native VC-1 streams
Match lavf's logic for how to parse the extradata.
2026-06-27 18:12:09 +02:00
verygoodlee 6b623e29cd select.lua: make property list more in line with the desc in the manual
1. the index of array-type properties is 0-based. ( e.g. `playlist/N` )
2. boolean values should be formatted as yes/no instead of true/false.
2026-06-27 18:11:48 +02:00
Nicolas F 669f431cf0 demux_edl: fix signed integer overflow in HLS bitrate
Use the new MP_SATURATE_MUL to prevent hls_bitrate from overflowing when
being multiplied by 8.

Fixes: #18120
2026-06-27 18:10:47 +02:00
Nicolas F f5a894de87 common/common: add saturating multiply macro
Add a new function-like macro MP_SATURATE_MUL. It multiplies a * b and
stores it in pointer "result", but sets "result" to its type's maximum
value if it overflows. Evaluates to true if it saturated, otherwise
false.
2026-06-27 18:10:47 +02:00
Nicolas F 8c6ad1b002 osdep/compiler: add MP_CKD_MUL
Add a new MP_CKD_MUL macro which does a multiplication with overflow
checking, backed by either the C23 ckd_mul standard function, or the
GCC/Clang __builtin_mul_overflow otherwise.
2026-06-27 18:10:47 +02:00
Kacper Michajłow ae99e39239 demux_mkv: remove redundant size checks
After previous commit, those sizes are checked in parser.
2026-06-27 18:09:12 +02:00
Kacper Michajłow 0251783b95 TOOLS/matroska.py: add size constraint for fixed size binary data
Those are fixed size per RFC and read as such in demux_mkv.c, fixes OOB
access in some cases that were missing the checks there.
2026-06-27 18:09:12 +02:00
Kacper Michajłow 23b9e96e9b demux/ebml: fix error path on data reject
If we don't read the data it shouldn't set the element as present.
2026-06-27 18:09:12 +02:00
Guido Cella 351291d583 menu.conf: compare aspect overrides more strictly
Fixes #18152.
2026-06-27 18:04:48 +02:00
Kacper Michajłow 0d68a842a0 hwdec_d3d11va: support 4:4:4 and high bit depth zero-copy formats
Replace the static format whitelist with a device-probed table and add
4:4:4 (VUYX/XV30/XV36/XV48) and 4:2:0 12/16-bit (P012/P016) surfaces to
both the zero-copy and copy mapper paths. The packed YUV formats can't be
decomposed by ra_get_imgfmt_desc(), so they are viewed as a single RGBA
texture and the swizzle is recovered from the imgfmt descriptor, which
only works with --vo=gpu-next.
2026-06-27 18:04:15 +02:00
Kacper Michajłow 2a49cc01d6 video/d3d: exclude VP9 on known broken Intel drivers 2026-06-27 18:03:54 +02:00
Kacper Michajłow 1d8cb602ac video/d3d: exclude HEVC on known crashing Intel drivers
The list of failing drivers was taken from a popular browser, which has
a lot of telemetry to determine which versions are not working.

Fixes: #18173
2026-06-27 18:03:54 +02:00
Kacper Michajłow 07c8c16bef vd_lavc: allow disabling codec hwdec per-device 2026-06-27 18:03:54 +02:00
Kacper Michajłow 70894ae039 ytdl_hook: defer loading until the formats become available
yt-dlp can provide time at which formats become available
`available_at`. Sleep until the requested time.

Fixes: #18192
2026-06-27 01:10:41 +02:00