From e36ea6fb75f7ce086bc11fc79c17c93e9b3cf6e2 Mon Sep 17 00:00:00 2001 From: lunik1 Date: Mon, 13 Mar 2023 21:23:47 +0000 Subject: [PATCH] mpv: apply patch to fix youtube DASH streams Co-authored-by: Sandro The ytdl_hook.lua supplied with the latest mpv release is incompatible with the latest yt-dlp release, causing streaming some youtube formats to fail. This applies an already-upstreamed fix. Upstream issue: mpv-player/mpv#11392 Upstream patch: mpv-player/mpv#11398 --- pkgs/applications/video/mpv/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index 0fa8486e15b..a24d2eb2394 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -2,6 +2,7 @@ , lib , stdenv , fetchFromGitHub +, fetchpatch , addOpenGLRunpath , docutils , meson @@ -93,6 +94,15 @@ in stdenv.mkDerivation (self: { sha256 = "sha256-CoYTX9hgxLo72YdMoa0sEywg4kybHbFsypHk1rCM6tM="; }; + patches = [ + (fetchpatch { + # fixes EDL error on youtube DASH streams https://github.com/mpv-player/mpv/issues/11392 + # to be removed on next release + url = "https://github.com/mpv-player/mpv/commit/94c189dae76ba280d9883b16346c3dfb9720687e.patch"; + sha256 = "sha256-MGXU1L5OSxY5bdEpu9vHngnRXMr7WHeHWuamhjcUD4A="; + }) + ]; + postPatch = '' patchShebangs version.* ./TOOLS/ '';