Skip to content

Commit

Permalink
stats.lua: display short decoder name if not generic one is used
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 committed Apr 17, 2024
1 parent a569c3c commit dc632e1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions player/lua/stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,10 @@ local function add_video(s)
if track and append(s, track["codec-desc"], {prefix_sep="", nl="", indent=""}) then
append(s, track["codec-profile"], {prefix="[", nl="", indent=" ", prefix_sep="",
no_prefix_markup=true, suffix="]"})
if track["codec"] ~= track["decoder"] then
append(s, track["decoder"], {prefix="[", nl="", indent=" ", prefix_sep="",
no_prefix_markup=true, suffix="]"})
end
append_property(s, "hwdec-current", {prefix="HW:", nl="",
indent=o.prefix_sep .. o.prefix_sep,
no_prefix_markup=false, suffix=""}, {no=true, [""]=true})
Expand Down Expand Up @@ -976,6 +980,10 @@ local function add_audio(s)
local track = mp.get_property_native("current-tracks/audio")
if track then
append(s, track["codec-desc"], {prefix_sep="", nl="", indent=""})
if track["codec"] ~= track["decoder"] then
append(s, track["decoder"], {prefix="[", nl="", indent=" ", prefix_sep="",
no_prefix_markup=true, suffix="]"})
end
append(s, track["codec-profile"], {prefix="[", nl="", indent=" ", prefix_sep="",
no_prefix_markup=true, suffix="]"})
end
Expand Down

0 comments on commit dc632e1

Please sign in to comment.