History

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().

Guido Cella committed 2 years ago

Commit b82d4371 parent 78b2de61 file · +2 −1Browse files

Showing the changes to player/lua/select.lua (1 of 1 file). Show all

Unified · Split

player/lua/select.lua+2−1
@@ -61,7 +61,8 @@ local function format_track(track) · 60 unmodified lines
6161 (track["demux-w"] and track["demux-w"] .. "x" .. track["demux-h"]
6262 .. " " or "") ..
6363 (track["demux-fps"] and not track.image
64− and string.format("%.3f", track["demux-fps"]) .. " fps " or "") ..
64+ and string.format("%.4f", track["demux-fps"]):gsub("%.?0*$", "") ..
65+ " fps " or "") ..
6566 (track["demux-channel-count"] and track["demux-channel-count"] ..
6667 " ch " or "") ..
6768 (track["codec-profile"] and track.type == "audio"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t