summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-08-10 11:52:51 -0500
committerDudemanguy <random342@airmail.cc>2023-08-11 22:28:50 +0000
commit598e30173d4a6b6414b010647e97809729224374 (patch)
tree16a4fa3a2d8a99100be0bddac7f18b38d956df10 /player
parentfccb4466cdb9d3d0e3fb8807af8f0ed192f4f406 (diff)
downloadmpv-598e30173d4a6b6414b010647e97809729224374.tar.bz2
mpv-598e30173d4a6b6414b010647e97809729224374.tar.xz
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.
Diffstat (limited to 'player')
-rw-r--r--player/command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index ae12748378..8a5d9dd14e 100644
--- a/player/command.c
+++ b/player/command.c
@@ -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\")",