Mercurial > mplayer.hg
changeset 29341:67b3e40a81c2
Print ID_AID_???_LANG and ID_SID_???_LANG in lavf demuxer so that frontends
can correctly display the languages of audio and subtitle tracks.
author | reimar |
---|---|
date | Wed, 24 Jun 2009 07:49:04 +0000 |
parents | 6abc7c14f271 |
children | ec913e932635 |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Tue Jun 23 17:50:08 2009 +0000 +++ b/libmpdemux/demux_lavf.c Wed Jun 24 07:49:04 2009 +0000 @@ -291,8 +291,10 @@ sh_audio->format = 0x7; break; } - if (st->language) + if (st->language) { sh_audio->lang = strdup(st->language); + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", i, sh_audio->lang); + } if (st->disposition & AV_DISPOSITION_DEFAULT) sh_audio->default_track = 1; if(mp_msg_test(MSGT_HEADER,MSGL_V) ) print_wave_header(sh_audio->wf, MSGL_V); @@ -399,8 +401,10 @@ memcpy(sh_sub->extradata, codec->extradata, codec->extradata_size); sh_sub->extradata_len = codec->extradata_size; } - if (st->language) + if (st->language) { sh_sub->lang = strdup(st->language); + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", priv->sub_streams, sh_sub->lang); + } if (st->disposition & AV_DISPOSITION_DEFAULT) sh_sub->default_track = 1; priv->sub_streams++;