From 61e9d9268cad62008f07e635d99cb6ab4120518c Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 3 Jan 2022 20:39:46 +0530 Subject: [PATCH] Fix bug in 8896899216e90b0ea7ddb1697faf1dc8411b78be Closes #2215 --- yt_dlp/postprocessor/ffmpeg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py index 97f04d116..53e292015 100644 --- a/yt_dlp/postprocessor/ffmpeg.py +++ b/yt_dlp/postprocessor/ffmpeg.py @@ -775,7 +775,7 @@ class FFmpegMetadataPP(FFmpegPostProcessor): stream_idx = 0 for fmt in info.get('requested_formats') or []: stream_count = 2 if 'none' not in (fmt.get('vcodec'), fmt.get('acodec')) else 1 - lang = ISO639Utils.short2long(fmt['language']) or fmt.get('language') + lang = ISO639Utils.short2long(fmt.get('language') or '') or fmt.get('language') for i in range(stream_idx, stream_idx + stream_count): if lang: metadata[str(i)].setdefault('language', lang)