summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-04-11 13:51:02 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-04-11 13:51:02 +0000
commit4567425051667ca3dd06749ca7b86e78b6073d6f (patch)
treee971c1d43c126bba872cb6b027233fc1bb95f14d
parent3818abb4aef50d3122925a3d731904124ec1e9cc (diff)
downloadmpv-4567425051667ca3dd06749ca7b86e78b6073d6f.tar.bz2
mpv-4567425051667ca3dd06749ca7b86e78b6073d6f.tar.xz
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
-rw-r--r--stream/stream_dvdnav.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index b8b9dcc397..adb0fcb54c 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -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);
}
}