[postprocessor] Fix _restrict_to when a codec is not set

This commit is contained in:
pukkandan 2021-06-14 02:05:57 +05:30
parent d0fb4bd16f
commit 7e87e27c52
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

View File

@ -76,8 +76,8 @@ class PostProcessor(object):
@functools.wraps(func)
def wrapper(self, info):
format_type = (
'video' if info['vcodec'] != 'none'
else 'audio' if info['acodec'] != 'none'
'video' if info.get('vcodec') != 'none'
else 'audio' if info.get('acodec') != 'none'
else 'images')
if allowed[format_type]:
return func(self, info)