summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-25 23:37:39 +0100
committerwm4 <wm4@nowhere>2012-11-25 23:40:07 +0100
commit2b728da8c8687846f6d6a2dc33c3d5e2879eafa5 (patch)
tree8ca03e665fcef546e7318b542790aed7fc2c3969 /core
parent5d5ddb2ad00a13e719585cefbbb59fa307fa2f73 (diff)
downloadmpv-2b728da8c8687846f6d6a2dc33c3d5e2879eafa5.tar.bz2
mpv-2b728da8c8687846f6d6a2dc33c3d5e2879eafa5.tar.xz
mplayer: fix track language display
This caused e.g. "--alang=" (without anything following) to be printed in the terminal output when the file specified no language for the track. Introduced by commit 9085b8.
Diffstat (limited to 'core')
-rw-r--r--core/mplayer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index a760a3d8cc..7e9ee62516 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -910,7 +910,8 @@ static struct track *add_stream_track(struct MPContext *mpctx,
track->demuxer_id)
};
stream_control(track->demuxer->stream, STREAM_CTRL_GET_LANG, &req);
- track->lang = talloc_strdup(track, req.name);
+ if (req.name[0])
+ track->lang = talloc_strdup(track, req.name);
}
return track;