1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00

command: don't print "unknown" on video tracks

When printing the name of the video track on the OSC, mpv almost always
prefixes it with "unknown". This is referring to the language tag which
essentially nobody ever does for the video track since it doesn't make
any sense. Instead of putting unknown when there's no language, just
make it an empty string instead. "Unknown" confuses can confuse users
here and practically nobody would guess that it's referring to language.
We still will print the language for a video track in case someone out
there really does tag it, but that should be rare.
This commit is contained in:
Dudemanguy 2023-08-10 11:52:51 -05:00
parent fccb4466cd
commit 598e30173d

View File

@ -1881,8 +1881,11 @@ static int property_switch_track(void *ctx, struct m_property *prop,
case M_PROPERTY_PRINT:
if (track) {
char *lang = track->lang;
if (!lang)
if (!lang && type != STREAM_VIDEO) {
lang = "unknown";
} else if (!lang) {
lang = "";
}
if (track->title) {
*(char **)arg = talloc_asprintf(NULL, "(%d) %s (\"%s\")",