aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfelix <felix.von.s@posteo.de>2021-05-02 11:10:35 +0200
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-06-06 00:59:04 +0530
commite2efe599aa9d7925c96d5e801acb901304a307fd (patch)
treec38ea5dbb112bebe6d0097fa8bd24dd2b5d07514
parent5e1dba8ed6a8974405ed038cb1ed7a82cdfaca4b (diff)
downloadhypervideo-pre-e2efe599aa9d7925c96d5e801acb901304a307fd.tar.lz
hypervideo-pre-e2efe599aa9d7925c96d5e801acb901304a307fd.tar.xz
hypervideo-pre-e2efe599aa9d7925c96d5e801acb901304a307fd.zip
[common] Fix FourCC fallback when parsing ISM (#372)
In some DASH manifests, the FourCC attribute is actually present, but empty. We thus apply the same fallback to 'AACL' that we do when the attribute is entirely absent. Authored by: fstirlitz
-rw-r--r--yt_dlp/extractor/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index 2e4f3559a..64ab8f706 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -2876,7 +2876,7 @@ class InfoExtractor(object):
stream_name = stream.get('Name')
stream_language = stream.get('Language', 'und')
for track in stream.findall('QualityLevel'):
- fourcc = track.get('FourCC', 'AACL' if track.get('AudioTag') == '255' else None)
+ fourcc = track.get('FourCC') or ('AACL' if track.get('AudioTag') == '255' else None)
# TODO: add support for WVC1 and WMAP
if fourcc not in ('H264', 'AVC1', 'AACL', 'TTML'):
self.report_warning('%s is not a supported codec' % fourcc)