player: Improve OSD formatting of sub-speed option

This commit is contained in:
Vladimir Panteleev 2016-09-13 01:17:40 +00:00 committed by wm4
parent 00f8ee573b
commit fb8f2a812e
1 changed files with 4 additions and 0 deletions

View File

@ -2958,6 +2958,9 @@ static int mp_property_sub_speed(void *ctx, struct m_property *prop,
}
return M_PROPERTY_OK;
}
case M_PROPERTY_PRINT:
*(char **)arg = talloc_asprintf(NULL, "%4.1f%%", 100 * opts->sub_speed);
return M_PROPERTY_OK;
}
return property_osd_helper(mpctx, prop, action, arg);
}
@ -4174,6 +4177,7 @@ static const struct property_osd_display {
{ "secondary-sid", "Secondary subtitles" },
{ "sub-pos", "Sub position" },
{ "sub-delay", "Sub delay" },
{ "sub-speed", "Sub speed" },
{ "sub-visibility", .msg = "Subtitles ${!sub-visibility==yes:hidden}"
"${?sub-visibility==yes:visible${?sub==no: (but no subtitles selected)}}" },
{ "sub-forced-only", "Forced sub only" },