summaryrefslogtreecommitdiffstats
path: root/codec-cfg.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-09 18:25:09 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-09 18:25:09 +0000
commit73ee220ab24699d505f1069c65c649d0b12986b8 (patch)
tree49e31d07009260d673b494bafbd656eb14318b45 /codec-cfg.c
parent9bc7d2ad04206b305ffaedbfacae632901211ee9 (diff)
downloadmpv-73ee220ab24699d505f1069c65c649d0b12986b8.tar.bz2
mpv-73ee220ab24699d505f1069c65c649d0b12986b8.tar.xz
enabled validate_codec with some restrictions
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3409 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'codec-cfg.c')
-rw-r--r--codec-cfg.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/codec-cfg.c b/codec-cfg.c
index 134950bbff..cd8c037424 100644
--- a/codec-cfg.c
+++ b/codec-cfg.c
@@ -243,26 +243,34 @@ static short get_driver(char *s,int audioflag)
static int validate_codec(codecs_t *c, int type)
{
-#if 0
int i;
+ char *tmp_name = strdup(c->name);
- for (i = 0; i < strlen(c->name) && isalnum(c->name[i]); i++)
+ for (i = 0; i < strlen(tmp_name) && isalnum(tmp_name[i]); i++)
/* NOTHING */;
- if (i < strlen(c->name)) {
- printf("\ncodec(%s)->name is not valid!\n", c->name);
+
+ if (i < strlen(tmp_name)) {
+ printf("\ncodec(%s) name is not valid!\n", c->name);
return 0;
}
-#warning codec->info = codec->name; ez ok, vagy strdup()?
+
if (!c->info)
- c->info = c->name;
+ c->info = strdup(c->name);
+
+#if 0
if (c->fourcc[0] == 0xffffffff) {
printf("\ncodec(%s) does not have fourcc/format!\n", c->name);
return 0;
}
+
+ /* XXX fix this: shitty with 'null' codec */
if (!c->driver) {
printf("\ncodec(%s) does not have a driver!\n", c->name);
return 0;
}
+#endif
+
+#if 0
#warning codec->driver == 4;... <- ezt nem kellene belehegeszteni...
#warning HOL VANNAK DEFINIALVA????????????
if (!c->dll && (c->driver == 4 ||
@@ -595,7 +603,7 @@ err_out:
free(fp);
return NULL;
err_out_not_valid:
- printf("codec is not definied correctly");
+ printf("codec is not defined correctly");
goto err_out_print_linenum;
}