mirror of
https://github.com/mpv-player/mpv
synced 2024-12-13 02:15:59 +00:00
Reemit the ID_AID_x_LANG for the track. This allows the identification of the
audio track by language code (en or es) rather than by ID (128 or 129). patch by Kevin DeKorte, kdekorte gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29170 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3818abb4ae
commit
4567425051
@ -74,6 +74,7 @@ static const struct m_struct_st stream_opts = {
|
||||
};
|
||||
|
||||
static int seek(stream_t *s, off_t newpos);
|
||||
static void show_audio_subs_languages(dvdnav_t *nav);
|
||||
|
||||
static dvdnav_priv_t * new_dvdnav_stream(char * filename) {
|
||||
const char * title_str;
|
||||
@ -343,6 +344,7 @@ static int fill_buffer(stream_t *s, char *but, int len)
|
||||
priv->state &= ~NAV_FLAG_WAIT;
|
||||
s->end_pos = 0;
|
||||
update_title_len(s);
|
||||
show_audio_subs_languages(priv->dvdnav);
|
||||
if (priv->state & NAV_FLAG_WAIT_READ_AUTO)
|
||||
priv->state |= NAV_FLAG_WAIT_READ;
|
||||
if(dvdnav_current_title_info(priv->dvdnav, &tit, &part) == DVDNAV_STATUS_OK) {
|
||||
@ -538,8 +540,12 @@ static void show_audio_subs_languages(dvdnav_t *nav)
|
||||
if(format == 0xFFFF || format > 6)
|
||||
format = 1; //unknown
|
||||
id = i + base[format];
|
||||
mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDaudioStreamInfo, i,
|
||||
dvd_audio_stream_types[format], dvd_audio_stream_channels[channels], tmp, id);
|
||||
if (lang != 0xFFFF) {
|
||||
mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDaudioStreamInfo, i,
|
||||
dvd_audio_stream_types[format], dvd_audio_stream_channels[channels], tmp, id);
|
||||
if(lang && tmp[0])
|
||||
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", id, tmp);
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0; i<32; i++)
|
||||
@ -555,7 +561,8 @@ static void show_audio_subs_languages(dvdnav_t *nav)
|
||||
tmp[1] = lang & 0xFF;
|
||||
}
|
||||
tmp[2] = 0;
|
||||
mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, i+0x20, tmp);
|
||||
if (lang != 0xFFFF)
|
||||
mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDsubtitleLanguage, i+0x20, tmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user