mirror of
https://github.com/mpv-player/mpv
synced 2025-02-19 22:36:55 +00:00
select.lua: strip trailing zeros from FPS values
Show e.g. "30 fps" instead of "30.000 fps". Also switch to %.4f for consistency with pretty_print_double().
This commit is contained in:
parent
78b2de677b
commit
b82d437ea4
@ -61,7 +61,8 @@ local function format_track(track)
|
||||
(track["demux-w"] and track["demux-w"] .. "x" .. track["demux-h"]
|
||||
.. " " or "") ..
|
||||
(track["demux-fps"] and not track.image
|
||||
and string.format("%.3f", track["demux-fps"]) .. " fps " or "") ..
|
||||
and string.format("%.4f", track["demux-fps"]):gsub("%.?0*$", "") ..
|
||||
" fps " or "") ..
|
||||
(track["demux-channel-count"] and track["demux-channel-count"] ..
|
||||
" ch " or "") ..
|
||||
(track["codec-profile"] and track.type == "audio"
|
||||
|
Loading…
Reference in New Issue
Block a user