diff options
author | gabucino <gabucino@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-08-09 14:23:16 +0000 |
---|---|---|
committer | gabucino <gabucino@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-08-09 14:23:16 +0000 |
commit | e2e2d40437a8a316b637125d3eb9cf72b52fa4ec (patch) | |
tree | 238f1e475450fae8ea2121b5bace818d2714f5a2 /libmpdemux | |
parent | 8875fde65911f9b04fb96d2ecb49f875aa39b076 (diff) | |
download | mpv-e2e2d40437a8a316b637125d3eb9cf72b52fa4ec.tar.bz2 mpv-e2e2d40437a8a316b637125d3eb9cf72b52fa4ec.tar.xz |
For a request by Gabu, i've cut & fix a part of Joey's dvd aid switching
patch, to always use the first audio track of DVD, unless -alang or -aid is
used. I think it will be almost always teh id 128. (actual number comes from
the .IFO)
(reported ok - Gabu)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10551 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/open.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libmpdemux/open.c b/libmpdemux/open.c index f0a3e7fff2..927dbeb971 100644 --- a/libmpdemux/open.c +++ b/libmpdemux/open.c @@ -618,7 +618,8 @@ int dvd_chapter_from_cell(dvd_priv_t* dvd,int title,int cell) int dvd_aid_from_lang(stream_t *stream, unsigned char* lang){ dvd_priv_t *d=stream->priv; int code,i; - while(lang && strlen(lang)>=2){ +if(lang){ + while(strlen(lang)>=2){ code=lang[1]|(lang[0]<<8); for(i=0;i<d->nr_of_channels;i++){ if(d->audio_streams[i].language==code){ @@ -631,7 +632,8 @@ int code,i; lang+=2; while (lang[0]==',' || lang[0]==' ') ++lang; } mp_msg(MSGT_OPEN,MSGL_WARN,"No matching DVD audio language found!\n"); - return -1; +} +return d->nr_of_channels ? d->audio_streams[0].id : -1; } int dvd_sid_from_lang(stream_t *stream, unsigned char* lang){ |