Fix rounding of integers in format table

This commit is contained in:
pukkandan 2022-07-10 16:51:28 +05:30
parent d816f61fbf
commit 563e0bf82a
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

View File

@ -3542,17 +3542,17 @@ def simplified_codec(f, field):
self._format_out(format_field(f, 'format_id'), self.Styles.ID),
format_field(f, 'ext'),
format_field(f, func=self.format_resolution, ignore=('audio only', 'images')),
format_field(f, 'fps', '\t%d'),
format_field(f, 'fps', '\t%d', func=round),
format_field(f, 'dynamic_range', '%s', ignore=(None, 'SDR')).replace('HDR', ''),
delim,
format_field(f, 'filesize', ' \t%s', func=format_bytes) + format_field(f, 'filesize_approx', '~\t%s', func=format_bytes),
format_field(f, 'tbr', '\t%dk'),
format_field(f, 'tbr', '\t%dk', func=round),
shorten_protocol_name(f.get('protocol', '')),
delim,
simplified_codec(f, 'vcodec'),
format_field(f, 'vbr', '\t%dk'),
format_field(f, 'vbr', '\t%dk', func=round),
simplified_codec(f, 'acodec'),
format_field(f, 'abr', '\t%dk'),
format_field(f, 'abr', '\t%dk', func=round),
format_field(f, 'asr', '\t%s', func=format_decimal_suffix),
join_nonempty(
self._format_out('UNSUPPORTED', 'light red') if f.get('ext') in ('f4f', 'f4m') else None,