Mercurial > mplayer.hg
changeset 29787:efe4987aac4d
Make the dvdnav stream language information output more similar to the dvd one.
author | reimar |
---|---|
date | Thu, 05 Nov 2009 21:22:38 +0000 |
parents | 345804c7a240 |
children | f60a8ab8c31c |
files | stream/stream_dvdnav.c |
diffstat | 1 files changed, 6 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_dvdnav.c Thu Nov 05 21:13:38 2009 +0000 +++ b/stream/stream_dvdnav.c Thu Nov 05 21:22:38 2009 +0000 @@ -517,9 +517,9 @@ uint8_t lg; uint16_t i, lang, format, id, channels; int base[7] = {128, 0, 0, 0, 160, 136, 0}; - char tmp[3]; for(i=0; i<8; i++) { + char tmp[] = "unknown"; lg = dvdnav_get_audio_logical_stream(nav, i); if(lg == 0xff) continue; channels = dvdnav_audio_stream_channels(nav, lg); @@ -528,14 +528,12 @@ else channels--; lang = dvdnav_audio_stream_to_lang(nav, lg); - if(lang == 0xFFFF) - tmp[0] = tmp[1] = '?'; - else + if(lang != 0xFFFF) { tmp[0] = lang >> 8; tmp[1] = lang & 0xFF; + tmp[2] = 0; } - tmp[2] = 0; format = dvdnav_audio_stream_format(nav, lg); if(format == 0xFFFF || format > 6) format = 1; //unknown @@ -550,18 +548,16 @@ for(i=0; i<32; i++) { + char tmp[] = "unknown"; lg = dvdnav_get_spu_logical_stream(nav, i); if(lg == 0xff) continue; lang = dvdnav_spu_stream_to_lang(nav, lg); - if(lang == 0xFFFF) - tmp[0] = tmp[1] = '?'; - else + if(lang != 0xFFFF) { tmp[0] = lang >> 8; tmp[1] = lang & 0xFF; + tmp[2] = 0; } - tmp[2] = 0; - if (lang != 0xFFFF) mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, i, tmp); } }