1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-29 02:22:19 +00:00

Print ID_AID_???_LANG and ID_SID_???_LANG in lavf demuxer so that frontends

can correctly display the languages of audio and subtitle tracks.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29383 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-06-24 07:49:04 +00:00
parent f29dc82d7e
commit 00be4423da

View File

@ -291,8 +291,10 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
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 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
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++;