Uppercase the codec string first, not last

This commit is contained in:
tcely 2024-12-05 18:27:46 -05:00 committed by GitHub
parent 6fdcc5ffa5
commit fb663d508f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -135,7 +135,7 @@ def seconds_to_timestr(seconds):
def normalize_codec(codec_str):
result = str(codec_str)
result = str(codec_str).upper()
parts = result.split('.')
if len(parts) > 0:
result = parts[0].strip()
@ -146,7 +146,7 @@ def normalize_codec(codec_str):
if str(0) in result:
prefix = result.rstrip('0123456789')
result = prefix + str(int(result[len(prefix):]))
return result.upper()
return result
def parse_media_format(format_dict):