From b18890b3dc3c4a2f4033085001b017673331ed37 Mon Sep 17 00:00:00 2001 From: Predidit <34627277+Predidit@users.noreply.github.com> Date: Tue, 28 Jul 2026 14:06:44 +0800 Subject: [PATCH 1/6] fix(ci): pin FFmpeg 7.1.5 and rebase HLS patch --- .github/workflows/build.yaml | 4 ++-- patch/ffmpeg/ffmpeg-hls-kazumi-combined.patch | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 22a25f1..668dc42 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -124,7 +124,7 @@ jobs: ./use-uchardet-master ./use-rubberband-master ./use-libdisplay-info-master - ./use-ffmpeg-custom release/7.1 + ./use-ffmpeg-custom n7.1.5 ./use-libass-master ./use-libplacebo-master ./use-mpv-custom 95c7599c41a4c7e332848fdb7e594650c1564e45 @@ -222,4 +222,4 @@ jobs: draft: false prerelease: false env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/patch/ffmpeg/ffmpeg-hls-kazumi-combined.patch b/patch/ffmpeg/ffmpeg-hls-kazumi-combined.patch index 1d3e1c3..abe0e4b 100644 --- a/patch/ffmpeg/ffmpeg-hls-kazumi-combined.patch +++ b/patch/ffmpeg/ffmpeg-hls-kazumi-combined.patch @@ -1,5 +1,5 @@ diff --git a/libavformat/hls.c b/libavformat/hls.c -index fe008ee..34e43da 100644 +index 900e96c..f6d1a80 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -84,6 +84,8 @@ struct segment { @@ -32,7 +32,7 @@ index fe008ee..34e43da 100644 } HLSContext; static void free_segment_dynarray(struct segment **segments, int n_segments) -@@ -799,6 +808,8 @@ static int parse_playlist(HLSContext *c, const char *url, +@@ -804,6 +813,8 @@ static int parse_playlist(HLSContext *c, const char *url, struct segment **prev_segments = NULL; int prev_n_segments = 0; int64_t prev_start_seq_no = -1; @@ -41,7 +41,7 @@ index fe008ee..34e43da 100644 if (is_http && !in && c->http_persistent && c->playlist_pb) { in = c->playlist_pb; -@@ -965,6 +976,15 @@ static int parse_playlist(HLSContext *c, const char *url, +@@ -975,6 +986,15 @@ static int parse_playlist(HLSContext *c, const char *url, } else if (av_strstart(line, "#EXT-X-ENDLIST", &ptr)) { if (pls) pls->finished = 1; @@ -55,9 +55,9 @@ index fe008ee..34e43da 100644 + next_seg_after_discontinuity = 1; + } } else if (av_strstart(line, "#EXTINF:", &ptr)) { - is_segment = 1; - duration = atof(ptr) * AV_TIME_BASE; -@@ -1064,6 +1084,9 @@ static int parse_playlist(HLSContext *c, const char *url, + double d = atof(ptr) * AV_TIME_BASE; + if (d < 0 || d > INT64_MAX || isnan(d)) { +@@ -1083,6 +1103,9 @@ static int parse_playlist(HLSContext *c, const char *url, } seg->init_section = cur_init_section; @@ -67,7 +67,7 @@ index fe008ee..34e43da 100644 } } } -@@ -1993,6 +2016,8 @@ static int hls_read_header(AVFormatContext *s) +@@ -2012,6 +2035,8 @@ static int hls_read_header(AVFormatContext *s) c->first_packet = 1; c->first_timestamp = AV_NOPTS_VALUE; c->cur_timestamp = AV_NOPTS_VALUE; @@ -76,7 +76,7 @@ index fe008ee..34e43da 100644 if ((ret = ffio_copy_url_options(s->pb, &c->avio_opts)) < 0) return ret; -@@ -2167,7 +2192,30 @@ static int hls_read_header(AVFormatContext *s) +@@ -2186,7 +2211,30 @@ static int hls_read_header(AVFormatContext *s) pls->ctx->max_analyze_duration = s->max_analyze_duration > 0 ? s->max_analyze_duration : 4 * AV_TIME_BASE; pls->ctx->interrupt_callback = s->interrupt_callback; url = av_strdup(pls->segments[0]->url); @@ -108,7 +108,7 @@ index fe008ee..34e43da 100644 for (int n = 0; n < pls->n_segments; n++) if (ret >= 0) -@@ -2387,6 +2435,67 @@ static int hls_read_packet(AVFormatContext *s, AVPacket *pkt) +@@ -2406,6 +2454,67 @@ static int hls_read_packet(AVFormatContext *s, AVPacket *pkt) } seg = current_segment(pls); @@ -176,7 +176,7 @@ index fe008ee..34e43da 100644 if (seg && seg->key_type == KEY_SAMPLE_AES && !strstr(pls->ctx->iformat->name, "mov")) { enum AVCodecID codec_id = pls->ctx->streams[pls->pkt->stream_index]->codecpar->codec_id; memcpy(c->crypto_ctx.iv, seg->iv, sizeof(seg->iv)); -@@ -2500,6 +2609,9 @@ static int hls_read_seek(AVFormatContext *s, int stream_index, +@@ -2519,6 +2628,9 @@ static int hls_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { HLSContext *c = s->priv_data; @@ -186,7 +186,7 @@ index fe008ee..34e43da 100644 struct playlist *seek_pls = NULL; int i, j; int stream_subdemuxer_index; -@@ -2664,6 +2776,10 @@ static const AVOption hls_options[] = { +@@ -2683,6 +2795,10 @@ static const AVOption hls_options[] = { OFFSET(seg_format_opts), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, FLAGS}, {"seg_max_retry", "Maximum number of times to reload a segment on error.", OFFSET(seg_max_retry), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS}, From 22b42e23486813edbd5bc20c968655a418e79a44 Mon Sep 17 00:00:00 2001 From: Predidit <34627277+Predidit@users.noreply.github.com> Date: Tue, 28 Jul 2026 14:11:05 +0800 Subject: [PATCH 2/6] refactor(build): remove sndio integration --- external/build | 2 -- external/clean | 1 - external/scripts/sndio-build | 5 ----- external/scripts/sndio-clean | 5 ----- external/scripts/sndio-config | 27 --------------------------- external/update | 1 - external/use-sndio-master | 5 ----- 7 files changed, 46 deletions(-) delete mode 100644 external/scripts/sndio-build delete mode 100644 external/scripts/sndio-clean delete mode 100644 external/scripts/sndio-config delete mode 100644 external/use-sndio-master diff --git a/external/build b/external/build index e9e4dec..4a09776 100644 --- a/external/build +++ b/external/build @@ -4,8 +4,6 @@ export LC_ALL=C #scripts/fribidi-config #scripts/fribidi-build "$@" -scripts/sndio-config -scripts/sndio-build "$@" scripts/bzip2-config scripts/bzip2-build "$@" scripts/uchardet-config diff --git a/external/clean b/external/clean index 7dd56f1..fdfae17 100644 --- a/external/clean +++ b/external/clean @@ -4,7 +4,6 @@ export LC_ALL=C scripts/ffmpeg-clean scripts/fribidi-clean scripts/rubberband-clean -scripts/sndio-clean scripts/uchardet-clean scripts/bzip2-clean scripts/libxpresent-clean diff --git a/external/scripts/sndio-build b/external/scripts/sndio-build deleted file mode 100644 index 83dfda5..0000000 --- a/external/scripts/sndio-build +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -set -e - -make -C sndio "$@" -make -C sndio install "$@" diff --git a/external/scripts/sndio-clean b/external/scripts/sndio-clean deleted file mode 100644 index 210d0b6..0000000 --- a/external/scripts/sndio-clean +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -if [ -f sndio/Makefile ];then - make -C sndio distclean -fi diff --git a/external/scripts/sndio-config b/external/scripts/sndio-config deleted file mode 100644 index d45f9fc..0000000 --- a/external/scripts/sndio-config +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -set -e -BUILD="$(pwd)" -newline=" -" - -if test -f "$BUILD"/sndio_options ; then - IFS=$newline - set -- $(cat "$BUILD"/sndio_options) "$@" - unset -v IFS -fi - -OPTIONS="--enable-static" - -case "$PKG_CONFIG_PATH" in - '') - export PKG_CONFIG_PATH="$BUILD/build_libs/lib/pkgconfig" - ;; - *) - export PKG_CONFIG_PATH="$BUILD/build_libs/lib/pkgconfig:$PKG_CONFIG_PATH" - ;; -esac - -cd "$BUILD"/sndio -# Later sndio doesn't automatically run configure with autogen.sh anymore -./configure CFLAGS="-fPIC" --prefix="$BUILD/build_libs" --libdir="$BUILD/build_libs/lib" $OPTIONS "$@" - diff --git a/external/update b/external/update index c031624..7d54de7 100644 --- a/external/update +++ b/external/update @@ -19,7 +19,6 @@ do_clone_all() { do_clone "ffmpeg" "https://github.com/FFmpeg/FFmpeg.git" #do_clone "fribidi" "http://anongit.freedesktop.org/git/fribidi/fribidi.git" - do_clone "sndio" "https://sndio.org/git/sndio" do_clone "bzip2" "https://github.com/libarchive/bzip2.git" do_clone "uchardet" "https://gitlab.freedesktop.org/uchardet/uchardet.git" do_clone "libxpresent" "https://gitlab.freedesktop.org/xorg/lib/libxpresent.git" diff --git a/external/use-sndio-master b/external/use-sndio-master deleted file mode 100644 index bc83643..0000000 --- a/external/use-sndio-master +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -set -e -export LC_ALL=C - -scripts/switch-branch sndio master \ No newline at end of file From 8d10a4effd578c367229c56daad9fd3278d9c6c3 Mon Sep 17 00:00:00 2001 From: Predidit <34627277+Predidit@users.noreply.github.com> Date: Tue, 28 Jul 2026 14:31:33 +0800 Subject: [PATCH 3/6] fix(deps): update mpv and libplacebo snapshots --- .github/workflows/build.yaml | 19 ++---------- patch/mpv/mpv-fix-libmpv-fd-leak.patch | 40 -------------------------- 2 files changed, 2 insertions(+), 57 deletions(-) delete mode 100644 patch/mpv/mpv-fix-libmpv-fd-leak.patch diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 668dc42..a65d2ff 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -126,8 +126,8 @@ jobs: ./use-libdisplay-info-master ./use-ffmpeg-custom n7.1.5 ./use-libass-master - ./use-libplacebo-master - ./use-mpv-custom 95c7599c41a4c7e332848fdb7e594650c1564e45 + ./use-libplacebo-custom 4c426e466814536def653cb23f1d1c287ea7a7f5 + ./use-mpv-custom 48e6c35c0e056d9e4ff04b98e012416697736d8a echo "updating submodules" @@ -148,21 +148,6 @@ jobs: done cd ../ - echo "applying patches to mpv" - - ls -l - cd mpv - for PATCH_FILE in $PATCH_DIR/mpv/*.patch; do - if [ -f "$PATCH_FILE" ]; then - echo "Applying patch: $PATCH_FILE" - git apply "$PATCH_FILE" - else - echo "No patch files found in $PATCH_DIR" - exit 1 - fi - done - cd ../ - ./clean ./build -j$(nproc) diff --git a/patch/mpv/mpv-fix-libmpv-fd-leak.patch b/patch/mpv/mpv-fix-libmpv-fd-leak.patch deleted file mode 100644 index c6be817..0000000 --- a/patch/mpv/mpv-fix-libmpv-fd-leak.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c -index 86e8d5daac..2714eeea38 100644 ---- a/video/out/opengl/context.c -+++ b/video/out/opengl/context.c -@@ -79,7 +79,6 @@ struct priv { - struct mp_log *log; - struct ra_ctx_params params; - struct opengl_opts *opts; -- struct ra_swapchain_fns fns; - GLuint main_fb; - struct ra_tex *wrapped_fb; // corresponds to main_fb - // for debugging: -@@ -130,6 +129,7 @@ bool ra_gl_ctx_init(struct ra_ctx *ctx, GL *gl, struct ra_ctx_params params) - struct ra_swapchain *sw = ctx->swapchain = talloc_ptrtype(NULL, sw); - *sw = (struct ra_swapchain) { - .ctx = ctx, -+ .fns = &ra_gl_swapchain_fns, - }; - - struct priv *p = sw->priv = talloc_ptrtype(sw, p); -@@ -138,10 +138,8 @@ bool ra_gl_ctx_init(struct ra_ctx *ctx, GL *gl, struct ra_ctx_params params) - .log = ctx->log, - .params = params, - .opts = mp_get_config_group(p, ctx->global, &opengl_conf), -- .fns = ra_gl_swapchain_fns, - }; - -- sw->fns = &p->fns; - - if (!gl->version && !gl->es) - return false; -@@ -232,7 +230,7 @@ bool ra_gl_ctx_submit_frame(struct ra_swapchain *sw, const struct vo_frame *fram - if (p->opts->use_glfinish) - gl->Finish(); - -- if (gl->FenceSync) { -+ if (gl->FenceSync && p->params.swap_buffers) { - GLsync fence = gl->FenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); - if (fence) - MP_TARRAY_APPEND(p, p->vsync_fences, p->num_vsync_fences, fence); From 210c8dba612e054b9abcd9fc4fd9e2ab046c325a Mon Sep 17 00:00:00 2001 From: Predidit <34627277+Predidit@users.noreply.github.com> Date: Tue, 28 Jul 2026 14:40:45 +0800 Subject: [PATCH 4/6] fix(ci): build Wayland 1.26.0 --- .github/workflows/build.yaml | 3 ++- external/build | 2 ++ external/clean | 1 + external/scripts/wayland-build | 4 ++++ external/scripts/wayland-clean | 3 +++ external/scripts/wayland-config | 20 ++++++++++++++++++++ external/update | 4 ++++ external/use-wayland-custom | 10 ++++++++++ 8 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 external/scripts/wayland-build create mode 100644 external/scripts/wayland-clean create mode 100644 external/scripts/wayland-config create mode 100644 external/use-wayland-custom diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a65d2ff..8d496e1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -47,7 +47,7 @@ jobs: libv4l-dev libva-dev libvdpau-dev libvorbis-dev libvo-amrwbenc-dev \ libunwind-dev libvpx-dev libwayland-dev libx11-dev libxext-dev \ libxkbcommon-dev libxrandr-dev libxss-dev libxv-dev libxvidcore-dev \ - linux-libc-dev nasm ninja-build pkg-config python3 python3-docutils wayland-protocols \ + libexpat1-dev libffi-dev linux-libc-dev nasm ninja-build pkg-config python3 python3-docutils wayland-protocols \ x11proto-core-dev zlib1g-dev libfdk-aac-dev libtheora-dev libwebp-dev \ unixodbc-dev libpq-dev libxxhash-dev libaom-dev pip3 install meson @@ -120,6 +120,7 @@ jobs: echo "build options added" ./use-bzip2-master + ./use-wayland-custom 87cc8a8728a923fc57938faa81ba0e74f34ecdc7 ./use-libxpresent-master ./use-uchardet-master ./use-rubberband-master diff --git a/external/build b/external/build index 4a09776..c7c06ab 100644 --- a/external/build +++ b/external/build @@ -4,6 +4,8 @@ export LC_ALL=C #scripts/fribidi-config #scripts/fribidi-build "$@" +scripts/wayland-config +scripts/wayland-build "$@" scripts/bzip2-config scripts/bzip2-build "$@" scripts/uchardet-config diff --git a/external/clean b/external/clean index fdfae17..415b6fc 100644 --- a/external/clean +++ b/external/clean @@ -3,6 +3,7 @@ export LC_ALL=C scripts/ffmpeg-clean scripts/fribidi-clean +scripts/wayland-clean scripts/rubberband-clean scripts/uchardet-clean scripts/bzip2-clean diff --git a/external/scripts/wayland-build b/external/scripts/wayland-build new file mode 100644 index 0000000..c3ec757 --- /dev/null +++ b/external/scripts/wayland-build @@ -0,0 +1,4 @@ +#!/bin/sh +set -e + +ninja install -C wayland/build "$@" diff --git a/external/scripts/wayland-clean b/external/scripts/wayland-clean new file mode 100644 index 0000000..5b615c1 --- /dev/null +++ b/external/scripts/wayland-clean @@ -0,0 +1,3 @@ +#!/bin/sh + +rm -rf wayland/build diff --git a/external/scripts/wayland-config b/external/scripts/wayland-config new file mode 100644 index 0000000..4090d6f --- /dev/null +++ b/external/scripts/wayland-config @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +BUILD="$(pwd)" + +case "$PKG_CONFIG_PATH" in + '') + export PKG_CONFIG_PATH="$BUILD/build_libs/lib/pkgconfig" + ;; + *) + export PKG_CONFIG_PATH="$BUILD/build_libs/lib/pkgconfig:$PKG_CONFIG_PATH" + ;; +esac + +cd "$BUILD"/wayland + +test -d build && OPTIONS="--wipe" +meson setup build --prefix="$BUILD/build_libs" --libdir="$BUILD/build_libs/lib" \ + -Dbuildtype=release -Dtests=false -Ddocumentation=false \ + -Ddtd_validation=false $OPTIONS "$@" diff --git a/external/update b/external/update index 7d54de7..6f49f4d 100644 --- a/external/update +++ b/external/update @@ -19,6 +19,7 @@ do_clone_all() { do_clone "ffmpeg" "https://github.com/FFmpeg/FFmpeg.git" #do_clone "fribidi" "http://anongit.freedesktop.org/git/fribidi/fribidi.git" + do_clone "wayland" "https://gitlab.freedesktop.org/wayland/wayland.git" do_clone "bzip2" "https://github.com/libarchive/bzip2.git" do_clone "uchardet" "https://gitlab.freedesktop.org/uchardet/uchardet.git" do_clone "libxpresent" "https://gitlab.freedesktop.org/xorg/lib/libxpresent.git" @@ -110,6 +111,7 @@ checkout() # fallback targets: release/master/@foo if no config file checkout_ffmpeg=master #checkout_fribidi=release +checkout_wayland=master checkout_libdisplay_info=master checkout_libass=master checkout_libplacebo=master @@ -122,6 +124,7 @@ checkout_all() do_clone_all checkout ffmpeg $checkout_ffmpeg #$checkout fribidi $checkout_fribidi + checkout wayland $checkout_wayland checkout libdisplay-info $checkout_libdisplay_info checkout libass $checkout_libass checkout libplacebo $checkout_libplacebo @@ -147,6 +150,7 @@ case "$1" in --master) checkout_ffmpeg="master -" #checkout_fribidi="master -" + checkout_wayland="master -" checkout_libass="master -" checkout_libplacebo="master -" checkout_mpv="master -" diff --git a/external/use-wayland-custom b/external/use-wayland-custom new file mode 100644 index 0000000..6395f6d --- /dev/null +++ b/external/use-wayland-custom @@ -0,0 +1,10 @@ +#!/bin/sh +set -e +export LC_ALL=C + +if [ -z "$1" ]; then + echo "Aborting. Please provide a commit hash or a tag/branch name." + exit 1 +fi + +scripts/switch-branch wayland "@$1" From 2cf5d55a8f6e6aad3213debd39a30c3415f53b93 Mon Sep 17 00:00:00 2001 From: Predidit <34627277+Predidit@users.noreply.github.com> Date: Tue, 28 Jul 2026 14:46:12 +0800 Subject: [PATCH 5/6] revert(ci): remove custom Wayland build --- .github/workflows/build.yaml | 3 +-- external/build | 2 -- external/clean | 1 - external/scripts/wayland-build | 4 ---- external/scripts/wayland-clean | 3 --- external/scripts/wayland-config | 20 -------------------- external/update | 4 ---- external/use-wayland-custom | 10 ---------- 8 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 external/scripts/wayland-build delete mode 100644 external/scripts/wayland-clean delete mode 100644 external/scripts/wayland-config delete mode 100644 external/use-wayland-custom diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8d496e1..a65d2ff 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -47,7 +47,7 @@ jobs: libv4l-dev libva-dev libvdpau-dev libvorbis-dev libvo-amrwbenc-dev \ libunwind-dev libvpx-dev libwayland-dev libx11-dev libxext-dev \ libxkbcommon-dev libxrandr-dev libxss-dev libxv-dev libxvidcore-dev \ - libexpat1-dev libffi-dev linux-libc-dev nasm ninja-build pkg-config python3 python3-docutils wayland-protocols \ + linux-libc-dev nasm ninja-build pkg-config python3 python3-docutils wayland-protocols \ x11proto-core-dev zlib1g-dev libfdk-aac-dev libtheora-dev libwebp-dev \ unixodbc-dev libpq-dev libxxhash-dev libaom-dev pip3 install meson @@ -120,7 +120,6 @@ jobs: echo "build options added" ./use-bzip2-master - ./use-wayland-custom 87cc8a8728a923fc57938faa81ba0e74f34ecdc7 ./use-libxpresent-master ./use-uchardet-master ./use-rubberband-master diff --git a/external/build b/external/build index c7c06ab..4a09776 100644 --- a/external/build +++ b/external/build @@ -4,8 +4,6 @@ export LC_ALL=C #scripts/fribidi-config #scripts/fribidi-build "$@" -scripts/wayland-config -scripts/wayland-build "$@" scripts/bzip2-config scripts/bzip2-build "$@" scripts/uchardet-config diff --git a/external/clean b/external/clean index 415b6fc..fdfae17 100644 --- a/external/clean +++ b/external/clean @@ -3,7 +3,6 @@ export LC_ALL=C scripts/ffmpeg-clean scripts/fribidi-clean -scripts/wayland-clean scripts/rubberband-clean scripts/uchardet-clean scripts/bzip2-clean diff --git a/external/scripts/wayland-build b/external/scripts/wayland-build deleted file mode 100644 index c3ec757..0000000 --- a/external/scripts/wayland-build +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -e - -ninja install -C wayland/build "$@" diff --git a/external/scripts/wayland-clean b/external/scripts/wayland-clean deleted file mode 100644 index 5b615c1..0000000 --- a/external/scripts/wayland-clean +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -rm -rf wayland/build diff --git a/external/scripts/wayland-config b/external/scripts/wayland-config deleted file mode 100644 index 4090d6f..0000000 --- a/external/scripts/wayland-config +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -e - -BUILD="$(pwd)" - -case "$PKG_CONFIG_PATH" in - '') - export PKG_CONFIG_PATH="$BUILD/build_libs/lib/pkgconfig" - ;; - *) - export PKG_CONFIG_PATH="$BUILD/build_libs/lib/pkgconfig:$PKG_CONFIG_PATH" - ;; -esac - -cd "$BUILD"/wayland - -test -d build && OPTIONS="--wipe" -meson setup build --prefix="$BUILD/build_libs" --libdir="$BUILD/build_libs/lib" \ - -Dbuildtype=release -Dtests=false -Ddocumentation=false \ - -Ddtd_validation=false $OPTIONS "$@" diff --git a/external/update b/external/update index 6f49f4d..7d54de7 100644 --- a/external/update +++ b/external/update @@ -19,7 +19,6 @@ do_clone_all() { do_clone "ffmpeg" "https://github.com/FFmpeg/FFmpeg.git" #do_clone "fribidi" "http://anongit.freedesktop.org/git/fribidi/fribidi.git" - do_clone "wayland" "https://gitlab.freedesktop.org/wayland/wayland.git" do_clone "bzip2" "https://github.com/libarchive/bzip2.git" do_clone "uchardet" "https://gitlab.freedesktop.org/uchardet/uchardet.git" do_clone "libxpresent" "https://gitlab.freedesktop.org/xorg/lib/libxpresent.git" @@ -111,7 +110,6 @@ checkout() # fallback targets: release/master/@foo if no config file checkout_ffmpeg=master #checkout_fribidi=release -checkout_wayland=master checkout_libdisplay_info=master checkout_libass=master checkout_libplacebo=master @@ -124,7 +122,6 @@ checkout_all() do_clone_all checkout ffmpeg $checkout_ffmpeg #$checkout fribidi $checkout_fribidi - checkout wayland $checkout_wayland checkout libdisplay-info $checkout_libdisplay_info checkout libass $checkout_libass checkout libplacebo $checkout_libplacebo @@ -150,7 +147,6 @@ case "$1" in --master) checkout_ffmpeg="master -" #checkout_fribidi="master -" - checkout_wayland="master -" checkout_libass="master -" checkout_libplacebo="master -" checkout_mpv="master -" diff --git a/external/use-wayland-custom b/external/use-wayland-custom deleted file mode 100644 index 6395f6d..0000000 --- a/external/use-wayland-custom +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e -export LC_ALL=C - -if [ -z "$1" ]; then - echo "Aborting. Please provide a commit hash or a tag/branch name." - exit 1 -fi - -scripts/switch-branch wayland "@$1" From cde98c4b8addf64d4dd05eaf1c8e920e3297f754 Mon Sep 17 00:00:00 2001 From: Predidit <34627277+Predidit@users.noreply.github.com> Date: Tue, 28 Jul 2026 14:48:16 +0800 Subject: [PATCH 6/6] fix(deps): pin mpv before Wayland 1.23 requirement --- .github/workflows/build.yaml | 16 ++++++++++- patch/mpv/mpv-fix-libmpv-fd-leak.patch | 40 ++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 patch/mpv/mpv-fix-libmpv-fd-leak.patch diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a65d2ff..343b233 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -127,7 +127,7 @@ jobs: ./use-ffmpeg-custom n7.1.5 ./use-libass-master ./use-libplacebo-custom 4c426e466814536def653cb23f1d1c287ea7a7f5 - ./use-mpv-custom 48e6c35c0e056d9e4ff04b98e012416697736d8a + ./use-mpv-custom f011d73d5fcf3f1907bbd6ddde3e860e3d611cf9 echo "updating submodules" @@ -148,6 +148,20 @@ jobs: done cd ../ + echo "applying patches to mpv" + + cd mpv + for PATCH_FILE in $PATCH_DIR/mpv/*.patch; do + if [ -f "$PATCH_FILE" ]; then + echo "Applying patch: $PATCH_FILE" + git apply "$PATCH_FILE" + else + echo "No patch files found in $PATCH_DIR/mpv" + exit 1 + fi + done + cd ../ + ./clean ./build -j$(nproc) diff --git a/patch/mpv/mpv-fix-libmpv-fd-leak.patch b/patch/mpv/mpv-fix-libmpv-fd-leak.patch new file mode 100644 index 0000000..c6be817 --- /dev/null +++ b/patch/mpv/mpv-fix-libmpv-fd-leak.patch @@ -0,0 +1,40 @@ +diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c +index 86e8d5daac..2714eeea38 100644 +--- a/video/out/opengl/context.c ++++ b/video/out/opengl/context.c +@@ -79,7 +79,6 @@ struct priv { + struct mp_log *log; + struct ra_ctx_params params; + struct opengl_opts *opts; +- struct ra_swapchain_fns fns; + GLuint main_fb; + struct ra_tex *wrapped_fb; // corresponds to main_fb + // for debugging: +@@ -130,6 +129,7 @@ bool ra_gl_ctx_init(struct ra_ctx *ctx, GL *gl, struct ra_ctx_params params) + struct ra_swapchain *sw = ctx->swapchain = talloc_ptrtype(NULL, sw); + *sw = (struct ra_swapchain) { + .ctx = ctx, ++ .fns = &ra_gl_swapchain_fns, + }; + + struct priv *p = sw->priv = talloc_ptrtype(sw, p); +@@ -138,10 +138,8 @@ bool ra_gl_ctx_init(struct ra_ctx *ctx, GL *gl, struct ra_ctx_params params) + .log = ctx->log, + .params = params, + .opts = mp_get_config_group(p, ctx->global, &opengl_conf), +- .fns = ra_gl_swapchain_fns, + }; + +- sw->fns = &p->fns; + + if (!gl->version && !gl->es) + return false; +@@ -232,7 +230,7 @@ bool ra_gl_ctx_submit_frame(struct ra_swapchain *sw, const struct vo_frame *fram + if (p->opts->use_glfinish) + gl->Finish(); + +- if (gl->FenceSync) { ++ if (gl->FenceSync && p->params.swap_buffers) { + GLsync fence = gl->FenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); + if (fence) + MP_TARRAY_APPEND(p, p->vsync_fences, p->num_vsync_fences, fence);