From 921b76cab8ac61b8234e511973d4b5bf934e5c2f Mon Sep 17 00:00:00 2001 From: pukkandan Date: Tue, 13 Apr 2021 10:53:25 +0530 Subject: [PATCH] Ensure `mergeall` selects best format when multistreams are disabled --- yt_dlp/YoutubeDL.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index e1ce8c9b3..d7cbdd047 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1650,8 +1650,8 @@ class YoutubeDL(object): formats = list(ctx['formats']) if not formats: return - merged_format = formats[0] - for f in formats[1:]: + merged_format = formats[-1] + for f in formats[-2::-1]: merged_format = _merge((merged_format, f)) yield merged_format