History

stats.lua: display short decoder name if not generic one is used

Kacper Michajłow committed 2 years ago

Commit dc632e11 parent a569c3c1 file · +8 −0Browse files

Unified · Split

player/lua/stats.lua+8−0
@@ -921,6 +921,10 @@ local function add_video(s) · 920 unmodified lines
921921 if track and append(s, track["codec-desc"], {prefix_sep="", nl="", indent=""}) then
922922 append(s, track["codec-profile"], {prefix="[", nl="", indent=" ", prefix_sep="",
923923 no_prefix_markup=true, suffix="]"})
924+ if track["codec"] ~= track["decoder"] then
925+ append(s, track["decoder"], {prefix="[", nl="", indent=" ", prefix_sep="",
926+ no_prefix_markup=true, suffix="]"})
927+ end
924928 append_property(s, "hwdec-current", {prefix="HW:", nl="",
925929 indent=o.prefix_sep .. o.prefix_sep,
926930 no_prefix_markup=false, suffix=""}, {no=true, [""]=true})
@@ -976,6 +980,10 @@ local function add_audio(s) · 49 unmodified lines
976980 local track = mp.get_property_native("current-tracks/audio")
977981 if track then
978982 append(s, track["codec-desc"], {prefix_sep="", nl="", indent=""})
983+ if track["codec"] ~= track["decoder"] then
984+ append(s, track["decoder"], {prefix="[", nl="", indent=" ", prefix_sep="",
985+ no_prefix_markup=true, suffix="]"})
986+ end
979987 append(s, track["codec-profile"], {prefix="[", nl="", indent=" ", prefix_sep="",
980988 no_prefix_markup=true, suffix="]"})
981989 end

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