[Mplayer-cvslog] CVS: 0_90/libmpdemux open.c,1.70,1.71

Gabucino gabucino at mplayerhq.hu
Sat Aug 9 16:24:39 CEST 2003


Update of /cvsroot/mplayer/0_90/libmpdemux
In directory mail:/var/tmp.root/cvs-serv27282/libmpdemux

Modified Files:
	open.c 
Log Message:
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)


Index: open.c
===================================================================
RCS file: /cvsroot/mplayer/0_90/libmpdemux/open.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- open.c	5 May 2003 02:42:41 -0000	1.70
+++ open.c	9 Aug 2003 14:24:36 -0000	1.71
@@ -648,7 +648,8 @@
 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){
@@ -661,7 +662,8 @@
     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){



More information about the MPlayer-cvslog mailing list