mirror of https://github.com/mpv-player/mpv
added new driver: null
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1294 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b95a30c771
commit
818a39476f
|
@ -192,6 +192,7 @@ err_out_parse_error:
|
|||
static short get_driver(char *s,int audioflag)
|
||||
{
|
||||
static char *audiodrv[] = {
|
||||
"null",
|
||||
"mp3lib",
|
||||
"pcm",
|
||||
"libac3",
|
||||
|
@ -203,6 +204,7 @@ static short get_driver(char *s,int audioflag)
|
|||
NULL
|
||||
};
|
||||
static char *videodrv[] = {
|
||||
"null",
|
||||
"libmpeg2",
|
||||
"vfw",
|
||||
"odivx",
|
||||
|
@ -213,9 +215,9 @@ static short get_driver(char *s,int audioflag)
|
|||
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 @@ codecs_t **parse_codec_cfg(char *cfgfile)
|
|||
} 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)
|
||||
|
|
Loading…
Reference in New Issue