From 8f84770acd7b70e7f6876f9ea8c5b1f4f0497b66 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sun, 14 Aug 2022 07:17:11 +0530 Subject: [PATCH] [utils] Fix `get_compatible_ext` Closes #4647 --- yt_dlp/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index e64d359365..db355ec92a 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -3501,8 +3501,8 @@ def get_compatible_ext(*, vcodecs, acodecs, vexts, aexts, preferences=None): }, } - sanitize_codec = functools.partial(try_get, getter=lambda x: x.split('.')[0].replace('0', '')) - vcodec, acodec = sanitize_codec(vcodecs[0]), sanitize_codec(acodecs[0]) + sanitize_codec = functools.partial(try_get, getter=lambda x: x[0].split('.')[0].replace('0', '')) + vcodec, acodec = sanitize_codec(vcodecs), sanitize_codec(acodecs) for ext in preferences or COMPATIBLE_CODECS.keys(): codec_set = COMPATIBLE_CODECS.get(ext, set())