diff options
author | wm4 <wm4@nowhere> | 2012-08-03 09:32:08 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 12:48:03 +0200 |
commit | e26b7314cf6751a5b2aafb9c29395711758e30b5 (patch) | |
tree | 78b09c49f044bf96a9bb6ee0c188e319ff7489a4 /mplayer.c | |
parent | e13c05366557cbe3bf371010f2087a57f072a7eb (diff) | |
download | mpv-e26b7314cf6751a5b2aafb9c29395711758e30b5.tar.bz2 mpv-e26b7314cf6751a5b2aafb9c29395711758e30b5.tar.xz |
mplayer: fix output of audio/sub language in terminal output
The SH_COMMON lang field seems to be blatantly unreliable and is not
always set by demux_lavf (at least not with dvdnav:// ).
Also fix the same for the show_tracks_osd slave command.
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -401,8 +401,13 @@ static void print_stream(struct MPContext *mpctx, sh_common_t *s) } mp_msg(MSGT_CPLAYER, MSGL_INFO, "[stream] ID %d: %s", s->demuxer_id, tname); mp_msg(MSGT_CPLAYER, MSGL_INFO, " --%s=%d", selopt, s->id); - if (s->lang) - mp_msg(MSGT_CPLAYER, MSGL_INFO, " --%s=%s", langopt, s->lang); + char *lang = NULL; + if (s->stream_type == STREAM_AUDIO) + lang = demuxer_audio_lang(mpctx->demuxer, s->index); + if (s->stream_type == STREAM_SUBTITLE) + lang = demuxer_sub_lang(mpctx->demuxer, s->index); + if (lang) + mp_msg(MSGT_CPLAYER, MSGL_INFO, " --%s=%s", langopt, lang); if (s->default_track) mp_msg(MSGT_CPLAYER, MSGL_INFO, " (*)"); if (s->title) |