changeset 1293:1b1213b1d58c

added new driver: null
author arpi
date Sun, 08 Jul 2001 12:24:49 +0000
parents f20f1851f193
children 0a8e0c7ddd0c
files codec-cfg.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/codec-cfg.c	Sun Jul 08 08:57:34 2001 +0000
+++ b/codec-cfg.c	Sun Jul 08 12:24:49 2001 +0000
@@ -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)