mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
[common] Prefer the manifest than formats_dict in determining codecs
This commit is contained in:
parent
5ea1eb78f5
commit
df374b5222
@ -1376,10 +1376,15 @@ def _add_ns(tag):
|
||||
full_info.update(f)
|
||||
codecs = r.attrib.get('codecs')
|
||||
if codecs:
|
||||
if full_info.get('acodec') == 'none':
|
||||
full_info['vcodec'] = codecs
|
||||
elif full_info.get('vcodec') == 'none':
|
||||
full_info['acodec'] = codecs
|
||||
if mime_type.startswith('video/'):
|
||||
vcodec, acodec = codecs, 'none'
|
||||
else: # mime_type.startswith('audio/')
|
||||
vcodec, acodec = 'none', codecs
|
||||
|
||||
full_info.update({
|
||||
'vcodec': vcodec,
|
||||
'acodec': acodec,
|
||||
})
|
||||
formats.append(full_info)
|
||||
else:
|
||||
existing_format.update(f)
|
||||
|
Loading…
Reference in New Issue
Block a user