On 2023-04-02 22:06:33 +0200, Sebastian Ramacher wrote: > Package: release.debian.org > Severity: normal > User: release.debian....@packages.debian.org > Usertags: unblock > X-Debbugs-Cc: m...@packages.debian.org, sramac...@debian.org > Control: affects -1 + src:mpv > > Please unblock package mpv. > > [ Reason ] > This upload fixes compatiblity of mpv with yt-dlp 2023.03.04 (see > #1033595, #1033609). yt-dlp 2023.03.04 is currenlty in testing. > > [ Impact ] > Playback of some Youtube videos via `mpv $some-youtube-url` remains > broken. > > [ Tests ] > The bug reporter confirmed that the new version works. > > [ Risks ] > The fix is taken from upstream's development branch and is confirmed to > work. In case other changes are required, I can backport those too. > > [ Checklist ] > [x] all changes are documented in the d/changelog > [x] I reviewed all changes and I approve them > [x] attach debdiff against the package in testing > > > unblock mpv/0.35.1-2
Now with the debdiff attached. Cheers -- Sebastian Ramacher
diff --git a/debian/changelog b/debian/changelog index c3eed9b07e..4b229d8248 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mpv (0.35.1-2) unstable; urgency=medium + + * debian/patches: Apply upstream patches for yt-dlp 2023.03.04 compatibility + (Closes: #1033595, #1033609) + + -- Sebastian Ramacher <sramac...@debian.org> Fri, 31 Mar 2023 20:46:51 +0200 + mpv (0.35.1-1) unstable; urgency=medium * New upstream version 0.35.1 diff --git a/debian/patches/0003-ytdl_hook-init-fragment-requires-other-fragments.patch b/debian/patches/0003-ytdl_hook-init-fragment-requires-other-fragments.patch new file mode 100644 index 0000000000..df5caa6c1c --- /dev/null +++ b/debian/patches/0003-ytdl_hook-init-fragment-requires-other-fragments.patch @@ -0,0 +1,25 @@ +From: Christoph Heinrich <christoph.heinr...@student.tugraz.at> +Date: Fri, 3 Mar 2023 00:45:45 +0100 +Subject: ytdl_hook: init fragment requires other fragments + +With dash the first fragment was always considered an init fragment if +there wasn't a duration. However that only makes sense when there are +also other fragments, so check if there are other fragments in addition +to the lack of a duration. +--- + player/lua/ytdl_hook.lua | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua +index f40579a..faaff8c 100644 +--- a/player/lua/ytdl_hook.lua ++++ b/player/lua/ytdl_hook.lua +@@ -295,7 +295,7 @@ local function edl_track_joined(fragments, protocol, is_live, base) + local args = "" + + -- assume MP4 DASH initialization segment +- if not fragments[1].duration then ++ if not fragments[1].duration and #fragments > 1 then + msg.debug("Using init segment") + args = args .. ",init=" .. edl_escape(join_url(base, fragments[1])) + offset = 2 diff --git a/debian/patches/0004-ytdl_hook-only-log-error-when-no-fallback-url-availa.patch b/debian/patches/0004-ytdl_hook-only-log-error-when-no-fallback-url-availa.patch new file mode 100644 index 0000000000..8349dca420 --- /dev/null +++ b/debian/patches/0004-ytdl_hook-only-log-error-when-no-fallback-url-availa.patch @@ -0,0 +1,36 @@ +From: Christoph Heinrich <christoph.heinr...@student.tugraz.at> +Date: Fri, 3 Mar 2023 00:50:58 +0100 +Subject: ytdl_hook: only log error when no fallback url available + +An error indicates that something doesn't work, but as long as a +safe url is available, playback is still expected to work. + +Thus reduce logging level of MP4 DASH without fragments message and +add a new error message for when there is no safe url available either. + +Also adds a missing space. +--- + player/lua/ytdl_hook.lua | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua +index faaff8c..362f433 100644 +--- a/player/lua/ytdl_hook.lua ++++ b/player/lua/ytdl_hook.lua +@@ -307,7 +307,7 @@ local function edl_track_joined(fragments, protocol, is_live, base) + -- if not available in all, give up. + for i = offset, #fragments do + if not fragments[i].duration then +- msg.error("EDL doesn't support fragments" .. ++ msg.verbose("EDL doesn't support fragments " .. + "without duration with MP4 DASH") + return nil + end +@@ -421,6 +421,7 @@ local function formats_to_edl(json, formats, use_all_formats) + track.protocol, json.is_live, + track.fragment_base_url) + if not edl_track and not url_is_safe(track.url) then ++ msg.error("No safe URL or supported fragmented stream available") + return nil + end + diff --git a/debian/patches/series b/debian/patches/series index 751c1bd8b7..b6ffb11634 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,4 @@ 0001-Add-keywords-to-desktop-file.patch 0002-io-stdin-used.patch +0003-ytdl_hook-init-fragment-requires-other-fragments.patch +0004-ytdl_hook-only-log-error-when-no-fallback-url-availa.patch