summaryrefslogtreecommitdiffstats
path: root/codec-cfg.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-30 21:44:20 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-30 21:44:20 +0000
commit1b667f61baba1328e45a5c33fe4a6343787c4b4a (patch)
tree8a13afc55b905ced9f349b56d9fb12ceabe4caed /codec-cfg.c
parent7af2d892c274222904eeeb5de0e394e5b52335fd (diff)
downloadmpv-1b667f61baba1328e45a5c33fe4a6343787c4b4a.tar.bz2
mpv-1b667f61baba1328e45a5c33fe4a6343787c4b4a.tar.xz
-afm/-vfm migration from ID (int) to NAME (string) - simplifies code and makes dlopen()'ing possible
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7181 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'codec-cfg.c')
-rw-r--r--codec-cfg.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/codec-cfg.c b/codec-cfg.c
index f40f6f45b2..979b79849b 100644
--- a/codec-cfg.c
+++ b/codec-cfg.c
@@ -210,6 +210,7 @@ err_out_parse_error:
return 0;
}
+#if 0
static short get_driver(char *s,int audioflag)
{
static char *audiodrv[] = {
@@ -278,6 +279,7 @@ static short get_driver(char *s,int audioflag)
return -1;
}
+#endif
static int validate_codec(codecs_t *c, int type)
{
@@ -581,8 +583,10 @@ int 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))<0)
- goto err_out_parse_error;
+ if (!(codec->drv = strdup(token[0]))) {
+ mp_msg(MSGT_CODECCFG,MSGL_ERR,"can't strdup -> 'driver': %s\n", strerror(errno));
+ goto err_out;
+ }
} else if (!strcmp(token[0], "dll")) {
if (get_token(1, 1) < 0)
goto err_out_parse_error;
@@ -651,11 +655,6 @@ int parse_codec_cfg(char *cfgfile)
goto err_out_parse_error;
if (!(codec->cpuflags = get_cpuflags(token[0])))
goto err_out_parse_error;
- } else if (!strcasecmp(token[0], "priority")) {
- if (get_token(1, 1) < 0)
- goto err_out_parse_error;
- //printf("\n\n!!!cfg-parse: priority %s (%d) found!!!\n\n", token[0], atoi(token[0])); // ::atmos
- codec->priority = atoi(token[0]);
} else
goto err_out_parse_error;
}
@@ -738,7 +737,8 @@ codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,
for (/* NOTHING */; i--; c++) {
if(start && c<=start) continue;
for (j = 0; j < CODECS_MAX_FOURCC; j++) {
- if (c->fourcc[j]==fourcc || c->driver==0) {
+ // FIXME: do NOT hardwire 'null' name here:
+ if (c->fourcc[j]==fourcc || !strcmp(c->drv,"null")) {
if (fourccmap)
*fourccmap = c->fourccmap[j];
return c;
@@ -787,9 +787,9 @@ void list_codecs(int audioflag){
case CODECS_STATUS_UNTESTED: s="untested";break;
}
if(c->dll)
- mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s%2d %s %s [%s]\n",c->name,c->driver,s,c->info,c->dll);
+ mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s %-6s %s %s [%s]\n",c->name,c->drv,s,c->info,c->dll);
else
- mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s%2d %s %s\n",c->name,c->driver,s,c->info);
+ mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s %-6s %s %s\n",c->name,c->drv,s,c->info);
}