[Mplayer-cvslog] CVS: main codec-cfg.c,1.23,1.24

Arpi of Ize arpi at mplayer.dev.hu
Sun Jul 8 14:24:51 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv23405

Modified Files:
	codec-cfg.c 
Log Message:
added new driver: null

Index: codec-cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/codec-cfg.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- codec-cfg.c	30 Jun 2001 00:16:39 -0000	1.23
+++ codec-cfg.c	8 Jul 2001 12:24:49 -0000	1.24
@@ -192,6 +192,7 @@
 static short get_driver(char *s,int audioflag)
 {
 	static char *audiodrv[] = {
+		"null",
 		"mp3lib",
 		"pcm",
 		"libac3",
@@ -203,6 +204,7 @@
 		NULL
 	};
 	static char *videodrv[] = {
+		"null",
 		"libmpeg2",
 		"vfw",
 		"odivx",
@@ -213,9 +215,9 @@
         char **drv=audioflag?audiodrv:videodrv;
         int i;
         
-        for(i=0;drv[i];i++) if(!strcmp(s,drv[i])) return i+1;
+        for(i=0;drv[i];i++) if(!strcmp(s,drv[i])) return i;
 
-	return 0;
+	return -1;
 }
 
 static int validate_codec(codecs_t *c, int type)
@@ -484,7 +486,7 @@
 		} else if (!strcmp(token[0], "driver")) {
 			if (get_token(1, 1) < 0)
 				goto err_out_parse_error;
-			if (!(codec->driver = get_driver(token[0],codec_type)))
+			if ((codec->driver = get_driver(token[0],codec_type))<0)
 				goto err_out_parse_error;
 		} else if (!strcmp(token[0], "dll")) {
 			if (get_token(1, 1) < 0)


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list